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

Side by Side Diff: chrome/browser/prefs/session_startup_pref.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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 (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/prefs/session_startup_pref.h" 5 #include "chrome/browser/prefs/session_startup_pref.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // static 65 // static
66 void SessionStartupPref::RegisterProfilePrefs( 66 void SessionStartupPref::RegisterProfilePrefs(
67 user_prefs::PrefRegistrySyncable* registry) { 67 user_prefs::PrefRegistrySyncable* registry) {
68 registry->RegisterIntegerPref( 68 registry->RegisterIntegerPref(
69 prefs::kRestoreOnStartup, 69 prefs::kRestoreOnStartup,
70 TypeToPrefValue(GetDefaultStartupType()), 70 TypeToPrefValue(GetDefaultStartupType()),
71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
72 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, 72 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup,
73 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 73 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
74 registry->RegisterListPref(prefs::kURLsToRestoreOnStartupOld, 74 registry->RegisterListPref(prefs::kURLsToRestoreOnStartupOld);
75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 75 registry->RegisterBooleanPref(prefs::kRestoreOnStartupMigrated, false);
76 registry->RegisterBooleanPref( 76 registry->RegisterInt64Pref(prefs::kRestoreStartupURLsMigrationTime, false);
77 prefs::kRestoreOnStartupMigrated,
78 false,
79 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
80 registry->RegisterInt64Pref(
81 prefs::kRestoreStartupURLsMigrationTime,
82 false,
83 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
84 } 77 }
85 78
86 // static 79 // static
87 SessionStartupPref::Type SessionStartupPref::GetDefaultStartupType() { 80 SessionStartupPref::Type SessionStartupPref::GetDefaultStartupType() {
88 #if defined(OS_CHROMEOS) 81 #if defined(OS_CHROMEOS)
89 return SessionStartupPref::LAST; 82 return SessionStartupPref::LAST;
90 #else 83 #else
91 return SessionStartupPref::DEFAULT; 84 return SessionStartupPref::DEFAULT;
92 #endif 85 #endif
93 } 86 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 case kPrefValueLast: return SessionStartupPref::LAST; 289 case kPrefValueLast: return SessionStartupPref::LAST;
297 case kPrefValueURLs: return SessionStartupPref::URLS; 290 case kPrefValueURLs: return SessionStartupPref::URLS;
298 case kPrefValueHomePage: return SessionStartupPref::HOMEPAGE; 291 case kPrefValueHomePage: return SessionStartupPref::HOMEPAGE;
299 default: return SessionStartupPref::DEFAULT; 292 default: return SessionStartupPref::DEFAULT;
300 } 293 }
301 } 294 }
302 295
303 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} 296 SessionStartupPref::SessionStartupPref(Type type) : type(type) {}
304 297
305 SessionStartupPref::~SessionStartupPref() {} 298 SessionStartupPref::~SessionStartupPref() {}
OLDNEW
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager_unittest.cc ('k') | chrome/browser/prefs/session_startup_pref_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698