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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 | Annotate | Revision Log
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/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 if (url_list->GetString(i, &url_text)) { 47 if (url_list->GetString(i, &url_text)) {
48 GURL fixed_url = URLFixerUpper::FixupURL(url_text, std::string()); 48 GURL fixed_url = URLFixerUpper::FixupURL(url_text, std::string());
49 pref->urls.push_back(fixed_url); 49 pref->urls.push_back(fixed_url);
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
56 // static 56 // static
57 void SessionStartupPref::RegisterUserPrefs( 57 void SessionStartupPref::RegisterProfilePrefs(
58 user_prefs::PrefRegistrySyncable* registry) { 58 user_prefs::PrefRegistrySyncable* registry) {
59 registry->RegisterIntegerPref( 59 registry->RegisterIntegerPref(
60 prefs::kRestoreOnStartup, 60 prefs::kRestoreOnStartup,
61 TypeToPrefValue(GetDefaultStartupType()), 61 TypeToPrefValue(GetDefaultStartupType()),
62 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 62 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
63 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, 63 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup,
64 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 64 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
65 registry->RegisterBooleanPref( 65 registry->RegisterBooleanPref(
66 prefs::kRestoreOnStartupMigrated, 66 prefs::kRestoreOnStartupMigrated,
67 false, 67 false,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 case kPrefValueLast: return SessionStartupPref::LAST; 232 case kPrefValueLast: return SessionStartupPref::LAST;
233 case kPrefValueURLs: return SessionStartupPref::URLS; 233 case kPrefValueURLs: return SessionStartupPref::URLS;
234 case kPrefValueHomePage: return SessionStartupPref::HOMEPAGE; 234 case kPrefValueHomePage: return SessionStartupPref::HOMEPAGE;
235 default: return SessionStartupPref::DEFAULT; 235 default: return SessionStartupPref::DEFAULT;
236 } 236 }
237 } 237 }
238 238
239 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} 239 SessionStartupPref::SessionStartupPref(Type type) : type(type) {}
240 240
241 SessionStartupPref::~SessionStartupPref() {} 241 SessionStartupPref::~SessionStartupPref() {}
OLDNEW
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.h ('k') | chrome/browser/prefs/session_startup_pref_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698