OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "ios/chrome/browser/search_engines/search_engines_util.h" | 5 #include "ios/chrome/browser/search_engines/search_engines_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "components/prefs/pref_service.h" |
11 #include "components/search_engines/search_engines_pref_names.h" | 11 #include "components/search_engines/search_engines_pref_names.h" |
12 #include "components/search_engines/template_url_prepopulate_data.h" | 12 #include "components/search_engines/template_url_prepopulate_data.h" |
13 #include "components/search_engines/template_url_service.h" | 13 #include "components/search_engines/template_url_service.h" |
14 #include "components/search_engines/template_url_service_observer.h" | 14 #include "components/search_engines/template_url_service_observer.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Id of the google id in template_url_prepopulate_data.cc. | 18 // Id of the google id in template_url_prepopulate_data.cc. |
19 static const int kGoogleEnginePrepopulatedId = 1; | 19 static const int kGoogleEnginePrepopulatedId = 1; |
20 | 20 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // removed then the engines can be updated again. | 106 // removed then the engines can be updated again. |
107 if (!service || service->is_default_search_managed()) | 107 if (!service || service->is_default_search_managed()) |
108 return; | 108 return; |
109 if (service->loaded()) | 109 if (service->loaded()) |
110 UpdateSearchEngine(service); | 110 UpdateSearchEngine(service); |
111 else | 111 else |
112 new LoadedObserver(service); // The observer manages its own lifetime. | 112 new LoadedObserver(service); // The observer manages its own lifetime. |
113 } | 113 } |
114 | 114 |
115 } // namespace search_engines | 115 } // namespace search_engines |
OLD | NEW |