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> |
| 8 |
7 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
8 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
9 #include "components/search_engines/search_engines_pref_names.h" | 11 #include "components/search_engines/search_engines_pref_names.h" |
10 #include "components/search_engines/template_url_prepopulate_data.h" | 12 #include "components/search_engines/template_url_prepopulate_data.h" |
11 #include "components/search_engines/template_url_service.h" | 13 #include "components/search_engines/template_url_service.h" |
12 #include "components/search_engines/template_url_service_observer.h" | 14 #include "components/search_engines/template_url_service_observer.h" |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 // Id of the google id in template_url_prepopulate_data.cc. | 18 // Id of the google id in template_url_prepopulate_data.cc. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // removed then the engines can be updated again. | 106 // removed then the engines can be updated again. |
105 if (!service || service->is_default_search_managed()) | 107 if (!service || service->is_default_search_managed()) |
106 return; | 108 return; |
107 if (service->loaded()) | 109 if (service->loaded()) |
108 UpdateSearchEngine(service); | 110 UpdateSearchEngine(service); |
109 else | 111 else |
110 new LoadedObserver(service); // The observer manages its own lifetime. | 112 new LoadedObserver(service); // The observer manages its own lifetime. |
111 } | 113 } |
112 | 114 |
113 } // namespace search_engines | 115 } // namespace search_engines |
OLD | NEW |