| 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_client.h" | 5 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 bool ChromeAutocompleteProviderClient::IsOffTheRecord() const { | 204 bool ChromeAutocompleteProviderClient::IsOffTheRecord() const { |
| 205 return profile_->IsOffTheRecord(); | 205 return profile_->IsOffTheRecord(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 bool ChromeAutocompleteProviderClient::SearchSuggestEnabled() const { | 208 bool ChromeAutocompleteProviderClient::SearchSuggestEnabled() const { |
| 209 return profile_->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled); | 209 return profile_->GetPrefs()->GetBoolean(prefs::kSearchSuggestEnabled); |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool ChromeAutocompleteProviderClient::TabSyncEnabledAndUnencrypted() const { | 212 bool ChromeAutocompleteProviderClient::TabSyncEnabledAndUnencrypted() const { |
| 213 return sync_driver::IsTabSyncEnabledAndUnencrypted( | 213 return syncer::IsTabSyncEnabledAndUnencrypted( |
| 214 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_), | 214 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_), |
| 215 profile_->GetPrefs()); | 215 profile_->GetPrefs()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void ChromeAutocompleteProviderClient::Classify( | 218 void ChromeAutocompleteProviderClient::Classify( |
| 219 const base::string16& text, | 219 const base::string16& text, |
| 220 bool prefer_keyword, | 220 bool prefer_keyword, |
| 221 bool allow_exact_keyword_match, | 221 bool allow_exact_keyword_match, |
| 222 metrics::OmniboxEventProto::PageClassification page_classification, | 222 metrics::OmniboxEventProto::PageClassification page_classification, |
| 223 AutocompleteMatch* match, | 223 AutocompleteMatch* match, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 241 image_service->Prefetch(url); | 241 image_service->Prefetch(url); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( | 244 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( |
| 245 AutocompleteController* controller) { | 245 AutocompleteController* controller) { |
| 246 content::NotificationService::current()->Notify( | 246 content::NotificationService::current()->Notify( |
| 247 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, | 247 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, |
| 248 content::Source<AutocompleteController>(controller), | 248 content::Source<AutocompleteController>(controller), |
| 249 content::NotificationService::NoDetails()); | 249 content::NotificationService::NoDetails()); |
| 250 } | 250 } |
| OLD | NEW |