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

Side by Side Diff: components/search_engines/template_url_service.cc

Issue 2091763002: Don't sync default_search_provider.synced_guid to mobile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/template_url_service.h" 5 #include "components/search_engines/template_url_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 TemplateURLService::~TemplateURLService() { 277 TemplateURLService::~TemplateURLService() {
278 // |web_data_service_| should be deleted during Shutdown(). 278 // |web_data_service_| should be deleted during Shutdown().
279 DCHECK(!web_data_service_.get()); 279 DCHECK(!web_data_service_.get());
280 STLDeleteElements(&template_urls_); 280 STLDeleteElements(&template_urls_);
281 } 281 }
282 282
283 // static 283 // static
284 void TemplateURLService::RegisterProfilePrefs( 284 void TemplateURLService::RegisterProfilePrefs(
285 user_prefs::PrefRegistrySyncable* registry) { 285 user_prefs::PrefRegistrySyncable* registry) {
286 #if defined(OS_IOS) || defined(OS_ANDROID)
287 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS;
288 #else
289 uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
290 #endif
286 registry->RegisterStringPref(prefs::kSyncedDefaultSearchProviderGUID, 291 registry->RegisterStringPref(prefs::kSyncedDefaultSearchProviderGUID,
287 std::string(), 292 std::string(),
288 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 293 flags);
289 registry->RegisterBooleanPref(prefs::kDefaultSearchProviderEnabled, true); 294 registry->RegisterBooleanPref(prefs::kDefaultSearchProviderEnabled, true);
290 registry->RegisterStringPref(prefs::kDefaultSearchProviderName, 295 registry->RegisterStringPref(prefs::kDefaultSearchProviderName,
291 std::string()); 296 std::string());
292 registry->RegisterStringPref(prefs::kDefaultSearchProviderID, std::string()); 297 registry->RegisterStringPref(prefs::kDefaultSearchProviderID, std::string());
293 registry->RegisterStringPref(prefs::kDefaultSearchProviderPrepopulateID, 298 registry->RegisterStringPref(prefs::kDefaultSearchProviderPrepopulateID,
294 std::string()); 299 std::string());
295 registry->RegisterStringPref(prefs::kDefaultSearchProviderSuggestURL, 300 registry->RegisterStringPref(prefs::kDefaultSearchProviderSuggestURL,
296 std::string()); 301 std::string());
297 registry->RegisterStringPref(prefs::kDefaultSearchProviderSearchURL, 302 registry->RegisterStringPref(prefs::kDefaultSearchProviderSearchURL,
298 std::string()); 303 std::string());
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 2473
2469 if (most_recently_intalled_default) { 2474 if (most_recently_intalled_default) {
2470 base::AutoReset<DefaultSearchChangeOrigin> change_origin( 2475 base::AutoReset<DefaultSearchChangeOrigin> change_origin(
2471 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); 2476 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION);
2472 default_search_manager_.SetExtensionControlledDefaultSearchEngine( 2477 default_search_manager_.SetExtensionControlledDefaultSearchEngine(
2473 most_recently_intalled_default->data()); 2478 most_recently_intalled_default->data());
2474 } else { 2479 } else {
2475 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); 2480 default_search_manager_.ClearExtensionControlledDefaultSearchEngine();
2476 } 2481 }
2477 } 2482 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698