OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" | 5 #include "chrome/browser/safe_browsing/browser_feature_extractor.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 return true; | 435 return true; |
436 } | 436 } |
437 return false; | 437 return false; |
438 } | 438 } |
439 | 439 |
440 bool BrowserFeatureExtractor::GetHistoryService(HistoryService** history) { | 440 bool BrowserFeatureExtractor::GetHistoryService(HistoryService** history) { |
441 *history = NULL; | 441 *history = NULL; |
442 if (tab_ && tab_->GetBrowserContext()) { | 442 if (tab_ && tab_->GetBrowserContext()) { |
443 Profile* profile = Profile::FromBrowserContext(tab_->GetBrowserContext()); | 443 Profile* profile = Profile::FromBrowserContext(tab_->GetBrowserContext()); |
444 *history = HistoryServiceFactory::GetForProfile(profile, | 444 *history = HistoryServiceFactory::GetForProfile(profile, |
445 Profile::EXPLICIT_ACCESS); | 445 Profile::EXPLICIT_ACCESS). |
| 446 get(); |
446 if (*history) { | 447 if (*history) { |
447 return true; | 448 return true; |
448 } | 449 } |
449 } | 450 } |
450 VLOG(2) << "Unable to query history. No history service available."; | 451 VLOG(2) << "Unable to query history. No history service available."; |
451 return false; | 452 return false; |
452 } | 453 } |
453 | 454 |
454 } // namespace safe_browsing | 455 } // namespace safe_browsing |
OLD | NEW |