Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/sync/profile_sync_service_factory.h" 25 #include "chrome/browser/sync/profile_sync_service_factory.h"
26 #include "chrome/common/chrome_features.h" 26 #include "chrome/common/chrome_features.h"
27 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
28 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
29 #include "components/browser_sync/profile_sync_service.h" 29 #include "components/browser_sync/profile_sync_service.h"
30 #include "components/history/core/browser/history_service.h" 30 #include "components/history/core/browser/history_service.h"
31 #include "components/omnibox/browser/autocomplete_classifier.h" 31 #include "components/omnibox/browser/autocomplete_classifier.h"
32 #include "components/prefs/pref_service.h" 32 #include "components/prefs/pref_service.h"
33 #include "components/sync/driver/sync_service_utils.h" 33 #include "components/sync/driver/sync_service_utils.h"
34 #include "content/public/browser/notification_service.h" 34 #include "content/public/browser/notification_service.h"
35 #include "extensions/features/features.h"
35 36
36 #if defined(ENABLE_EXTENSIONS) 37 #if BUILDFLAG(ENABLE_EXTENSIONS)
37 #include "chrome/browser/autocomplete/keyword_extensions_delegate_impl.h" 38 #include "chrome/browser/autocomplete/keyword_extensions_delegate_impl.h"
38 #endif 39 #endif
39 40
40 #if !defined(OS_ANDROID) 41 #if !defined(OS_ANDROID)
41 namespace { 42 namespace {
42 43
43 // This list should be kept in sync with chrome/common/url_constants.h. 44 // This list should be kept in sync with chrome/common/url_constants.h.
44 // Only include useful sub-pages, confirmation alerts are not useful. 45 // Only include useful sub-pages, confirmation alerts are not useful.
45 const char* const kChromeSettingsSubPages[] = { 46 const char* const kChromeSettingsSubPages[] = {
46 chrome::kAutofillSubPage, 47 chrome::kAutofillSubPage,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 136 }
136 137
137 scoped_refptr<ShortcutsBackend> 138 scoped_refptr<ShortcutsBackend>
138 ChromeAutocompleteProviderClient::GetShortcutsBackendIfExists() { 139 ChromeAutocompleteProviderClient::GetShortcutsBackendIfExists() {
139 return ShortcutsBackendFactory::GetForProfileIfExists(profile_); 140 return ShortcutsBackendFactory::GetForProfileIfExists(profile_);
140 } 141 }
141 142
142 std::unique_ptr<KeywordExtensionsDelegate> 143 std::unique_ptr<KeywordExtensionsDelegate>
143 ChromeAutocompleteProviderClient::GetKeywordExtensionsDelegate( 144 ChromeAutocompleteProviderClient::GetKeywordExtensionsDelegate(
144 KeywordProvider* keyword_provider) { 145 KeywordProvider* keyword_provider) {
145 #if defined(ENABLE_EXTENSIONS) 146 #if BUILDFLAG(ENABLE_EXTENSIONS)
146 return base::MakeUnique<KeywordExtensionsDelegateImpl>(profile_, 147 return base::MakeUnique<KeywordExtensionsDelegateImpl>(profile_,
147 keyword_provider); 148 keyword_provider);
148 #else 149 #else
149 return nullptr; 150 return nullptr;
150 #endif 151 #endif
151 } 152 }
152 153
153 PhysicalWebDataSource* 154 PhysicalWebDataSource*
154 ChromeAutocompleteProviderClient::GetPhysicalWebDataSource() { 155 ChromeAutocompleteProviderClient::GetPhysicalWebDataSource() {
155 return nullptr; 156 return nullptr;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 image_service->Prefetch(url); 250 image_service->Prefetch(url);
250 } 251 }
251 252
252 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( 253 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady(
253 AutocompleteController* controller) { 254 AutocompleteController* controller) {
254 content::NotificationService::current()->Notify( 255 content::NotificationService::current()->Notify(
255 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, 256 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
256 content::Source<AutocompleteController>(controller), 257 content::Source<AutocompleteController>(controller),
257 content::NotificationService::NoDetails()); 258 content::NotificationService::NoDetails());
258 } 259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698