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

Side by Side Diff: ios/chrome/browser/search_engines/search_engines_util.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 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 "components/prefs/pref_service.h" 10 #include "base/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
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
OLDNEW
« no previous file with comments | « ios/chrome/browser/safe_browsing/ui_manager.cc ('k') | ios/chrome/browser/signin/browser_state_data_remover.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698