OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/autocomplete/chrome_autocomplete_provider_delegate.h" | 5 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_delegate.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 8 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
9 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" | 9 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
10 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" | 10 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 std::string ChromeAutocompleteProviderDelegate::AcceptLanguages() { | 37 std::string ChromeAutocompleteProviderDelegate::AcceptLanguages() { |
38 return profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); | 38 return profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); |
39 } | 39 } |
40 | 40 |
41 bool ChromeAutocompleteProviderDelegate::SearchSuggestEnabled() { | 41 bool ChromeAutocompleteProviderDelegate::SearchSuggestEnabled() { |
42 return profile_->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled); | 42 return profile_->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled); |
43 } | 43 } |
44 | 44 |
45 bool ChromeAutocompleteProviderDelegate::ShowBookmarkBar() { | 45 bool ChromeAutocompleteProviderDelegate::ShowBookmarkBar() { |
46 return profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); | 46 return profile_->GetPrefs()->GetBoolean(bookmarks::prefs::kShowBookmarkBar); |
47 } | 47 } |
48 | 48 |
49 const AutocompleteSchemeClassifier& | 49 const AutocompleteSchemeClassifier& |
50 ChromeAutocompleteProviderDelegate::SchemeClassifier() { | 50 ChromeAutocompleteProviderDelegate::SchemeClassifier() { |
51 return scheme_classifier_; | 51 return scheme_classifier_; |
52 } | 52 } |
53 | 53 |
54 void ChromeAutocompleteProviderDelegate::Classify( | 54 void ChromeAutocompleteProviderDelegate::Classify( |
55 const base::string16& text, | 55 const base::string16& text, |
56 bool prefer_keyword, | 56 bool prefer_keyword, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 syncer::PROXY_TABS) && | 90 syncer::PROXY_TABS) && |
91 !service->GetEncryptedDataTypes().Has(syncer::SESSIONS); | 91 !service->GetEncryptedDataTypes().Has(syncer::SESSIONS); |
92 } | 92 } |
93 | 93 |
94 void ChromeAutocompleteProviderDelegate::PrefetchImage(const GURL& url) { | 94 void ChromeAutocompleteProviderDelegate::PrefetchImage(const GURL& url) { |
95 BitmapFetcherService* image_service = | 95 BitmapFetcherService* image_service = |
96 BitmapFetcherServiceFactory::GetForBrowserContext(profile_); | 96 BitmapFetcherServiceFactory::GetForBrowserContext(profile_); |
97 DCHECK(image_service); | 97 DCHECK(image_service); |
98 image_service->Prefetch(url); | 98 image_service->Prefetch(url); |
99 } | 99 } |
OLD | NEW |