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 "components/search_engines/default_search_manager.h" | 5 #include "components/search_engines/default_search_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/bind_helpers.h" | 14 #include "base/bind_helpers.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/i18n/case_conversion.h" | 16 #include "base/i18n/case_conversion.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/prefs/pref_service.h" | |
19 #include "base/prefs/pref_value_map.h" | |
20 #include "base/stl_util.h" | 18 #include "base/stl_util.h" |
21 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
23 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
24 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
25 #include "base/time/time.h" | 23 #include "base/time/time.h" |
26 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
| 25 #include "components/prefs/pref_service.h" |
| 26 #include "components/prefs/pref_value_map.h" |
27 #include "components/search_engines/search_engines_pref_names.h" | 27 #include "components/search_engines/search_engines_pref_names.h" |
28 #include "components/search_engines/template_url_data.h" | 28 #include "components/search_engines/template_url_data.h" |
29 #include "components/search_engines/template_url_prepopulate_data.h" | 29 #include "components/search_engines/template_url_prepopulate_data.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 bool g_fallback_search_engines_disabled = false; | 33 bool g_fallback_search_engines_disabled = false; |
34 | 34 |
35 } // namespace | 35 } // namespace |
36 | 36 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 MergePrefsDataWithPrepopulated(); | 411 MergePrefsDataWithPrepopulated(); |
412 } | 412 } |
413 | 413 |
414 void DefaultSearchManager::NotifyObserver() { | 414 void DefaultSearchManager::NotifyObserver() { |
415 if (!change_observer_.is_null()) { | 415 if (!change_observer_.is_null()) { |
416 Source source = FROM_FALLBACK; | 416 Source source = FROM_FALLBACK; |
417 TemplateURLData* data = GetDefaultSearchEngine(&source); | 417 TemplateURLData* data = GetDefaultSearchEngine(&source); |
418 change_observer_.Run(data, source); | 418 change_observer_.Run(data, source); |
419 } | 419 } |
420 } | 420 } |
OLD | NEW |