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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 2049543003: Make some profile-related prefs non-syncable on mobile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 // static 323 // static
324 void ProfileImpl::RegisterProfilePrefs( 324 void ProfileImpl::RegisterProfilePrefs(
325 user_prefs::PrefRegistrySyncable* registry) { 325 user_prefs::PrefRegistrySyncable* registry) {
326 registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, false); 326 registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, false);
327 registry->RegisterBooleanPref(prefs::kAllowDeletingBrowserHistory, true); 327 registry->RegisterBooleanPref(prefs::kAllowDeletingBrowserHistory, true);
328 registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false); 328 registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false);
329 registry->RegisterBooleanPref(prefs::kForceYouTubeSafetyMode, false); 329 registry->RegisterBooleanPref(prefs::kForceYouTubeSafetyMode, false);
330 registry->RegisterBooleanPref(prefs::kForceSessionSync, false); 330 registry->RegisterBooleanPref(prefs::kForceSessionSync, false);
331 registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string()); 331 registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string());
332
333 #if defined(OS_ANDROID)
334 // The following prefs don't need to be sync'd to mobile. This file isn't
335 // compiled on iOS so we only need to exclude them syncing from the Android
336 // build.
337 registry->RegisterIntegerPref(prefs::kProfileAvatarIndex, -1);
338 // Whether a profile is using an avatar without having explicitely chosen it
339 // (i.e. was assigned by default by legacy profile creation).
340 registry->RegisterBooleanPref(prefs::kProfileUsingDefaultAvatar, true);
341 registry->RegisterBooleanPref(prefs::kProfileUsingGAIAAvatar, false);
342 // Whether a profile is using a default avatar name (eg. Pickles or Person 1).
343 registry->RegisterBooleanPref(prefs::kProfileUsingDefaultName, true);
344 registry->RegisterStringPref(prefs::kProfileName, std::string());
345 #else
332 registry->RegisterIntegerPref( 346 registry->RegisterIntegerPref(
333 prefs::kProfileAvatarIndex, 347 prefs::kProfileAvatarIndex,
334 -1, 348 -1,
335 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 349 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
336 // Whether a profile is using an avatar without having explicitely chosen it 350 // Whether a profile is using an avatar without having explicitely chosen it
337 // (i.e. was assigned by default by legacy profile creation). 351 // (i.e. was assigned by default by legacy profile creation).
338 registry->RegisterBooleanPref( 352 registry->RegisterBooleanPref(
339 prefs::kProfileUsingDefaultAvatar, 353 prefs::kProfileUsingDefaultAvatar,
340 true, 354 true,
341 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 355 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
342 registry->RegisterBooleanPref( 356 registry->RegisterBooleanPref(
343 prefs::kProfileUsingGAIAAvatar, 357 prefs::kProfileUsingGAIAAvatar,
344 false, 358 false,
345 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 359 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
346 // Whether a profile is using a default avatar name (eg. Pickles or Person 1). 360 // Whether a profile is using a default avatar name (eg. Pickles or Person 1).
347 registry->RegisterBooleanPref( 361 registry->RegisterBooleanPref(
348 prefs::kProfileUsingDefaultName, 362 prefs::kProfileUsingDefaultName,
349 true, 363 true,
350 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 364 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
351 registry->RegisterStringPref(prefs::kSupervisedUserId, std::string());
352 registry->RegisterStringPref(prefs::kProfileName, 365 registry->RegisterStringPref(prefs::kProfileName,
353 std::string(), 366 std::string(),
354 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 367 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
368 #endif
369
370 registry->RegisterStringPref(prefs::kSupervisedUserId, std::string());
355 registry->RegisterStringPref(prefs::kHomePage, 371 registry->RegisterStringPref(prefs::kHomePage,
356 std::string(), 372 std::string(),
357 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 373 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
358 #if defined(ENABLE_PRINTING) 374 #if defined(ENABLE_PRINTING)
359 registry->RegisterBooleanPref(prefs::kPrintingEnabled, true); 375 registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
360 #endif 376 #endif
361 registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false); 377 registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false);
362 registry->RegisterStringPref( 378 registry->RegisterStringPref(
363 prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string()); 379 prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
364 registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false); 380 registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1274 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1259 domain_reliability::DomainReliabilityService* service = 1275 domain_reliability::DomainReliabilityService* service =
1260 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1276 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1261 GetForBrowserContext(this); 1277 GetForBrowserContext(this);
1262 if (!service) 1278 if (!service)
1263 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1279 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1264 1280
1265 return service->CreateMonitor( 1281 return service->CreateMonitor(
1266 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1282 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1267 } 1283 }
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