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/feature_list.h" | 9 #include "base/feature_list.h" |
Lei Zhang
2017/06/03 01:03:49
Delete? I'd just grep for FeatureList in all the m
Dan Beam
2017/06/06 03:52:50
Done.
| |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" | 14 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
15 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" | 15 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" |
16 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" | 16 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" |
17 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" | 17 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" |
18 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h" | 18 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h" |
19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 19 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 i != chrome_builtins.end(); ++i) | 180 i != chrome_builtins.end(); ++i) |
181 builtins.push_back(base::ASCIIToUTF16(*i)); | 181 builtins.push_back(base::ASCIIToUTF16(*i)); |
182 | 182 |
183 #if !defined(OS_ANDROID) | 183 #if !defined(OS_ANDROID) |
184 base::string16 settings(base::ASCIIToUTF16(chrome::kChromeUISettingsHost) + | 184 base::string16 settings(base::ASCIIToUTF16(chrome::kChromeUISettingsHost) + |
185 base::ASCIIToUTF16("/")); | 185 base::ASCIIToUTF16("/")); |
186 for (size_t i = 0; i < arraysize(kChromeSettingsSubPages); i++) { | 186 for (size_t i = 0; i < arraysize(kChromeSettingsSubPages); i++) { |
187 builtins.push_back(settings + | 187 builtins.push_back(settings + |
188 base::ASCIIToUTF16(kChromeSettingsSubPages[i])); | 188 base::ASCIIToUTF16(kChromeSettingsSubPages[i])); |
189 } | 189 } |
190 | |
191 if (!base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) { | |
192 builtins.push_back( | |
193 settings + | |
194 base::ASCIIToUTF16( | |
195 chrome::kDeprecatedOptionsContentSettingsExceptionsSubPage)); | |
196 } | |
197 #endif | 190 #endif |
198 | 191 |
199 return builtins; | 192 return builtins; |
200 } | 193 } |
201 | 194 |
202 std::vector<base::string16> | 195 std::vector<base::string16> |
203 ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { | 196 ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { |
204 std::vector<base::string16> builtins_to_provide; | 197 std::vector<base::string16> builtins_to_provide; |
205 builtins_to_provide.push_back( | 198 builtins_to_provide.push_back( |
206 base::ASCIIToUTF16(chrome::kChromeUIChromeURLsURL)); | 199 base::ASCIIToUTF16(chrome::kChromeUIChromeURLsURL)); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
293 image_service->Prefetch(url, traffic_annotation); | 286 image_service->Prefetch(url, traffic_annotation); |
294 } | 287 } |
295 | 288 |
296 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( | 289 void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady( |
297 AutocompleteController* controller) { | 290 AutocompleteController* controller) { |
298 content::NotificationService::current()->Notify( | 291 content::NotificationService::current()->Notify( |
299 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, | 292 chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, |
300 content::Source<AutocompleteController>(controller), | 293 content::Source<AutocompleteController>(controller), |
301 content::NotificationService::NoDetails()); | 294 content::NotificationService::NoDetails()); |
302 } | 295 } |
OLD | NEW |