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

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

Issue 2114923002: Don't sync session.startup_urls and session.urls_to_restore_on_startup to mobile platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't sync session.startup_urls and session.urls_to_restore_on_startup to mobile platforms. Created 4 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
« 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/prefs/session_startup_pref.h" 5 #include "chrome/browser/prefs/session_startup_pref.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 26 matching lines...) Expand all
37 pref->urls.push_back(fixed_url); 37 pref->urls.push_back(fixed_url);
38 } 38 }
39 } 39 }
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
44 // static 44 // static
45 void SessionStartupPref::RegisterProfilePrefs( 45 void SessionStartupPref::RegisterProfilePrefs(
46 user_prefs::PrefRegistrySyncable* registry) { 46 user_prefs::PrefRegistrySyncable* registry) {
47 registry->RegisterIntegerPref( 47 #if defined(OS_IOS) || defined(OS_ANDROID)
48 prefs::kRestoreOnStartup, 48 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS;
49 TypeToPrefValue(GetDefaultStartupType()), 49 #else
50 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 50 uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
51 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, 51 #endif
52 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 52 registry->RegisterIntegerPref(prefs::kRestoreOnStartup,
53 TypeToPrefValue(GetDefaultStartupType()),
54 flags);
55 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, flags);
53 } 56 }
54 57
55 // static 58 // static
56 SessionStartupPref::Type SessionStartupPref::GetDefaultStartupType() { 59 SessionStartupPref::Type SessionStartupPref::GetDefaultStartupType() {
57 #if defined(OS_CHROMEOS) 60 #if defined(OS_CHROMEOS)
58 return SessionStartupPref::LAST; 61 return SessionStartupPref::LAST;
59 #else 62 #else
60 return SessionStartupPref::DEFAULT; 63 return SessionStartupPref::DEFAULT;
61 #endif 64 #endif
62 } 65 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 default: return SessionStartupPref::DEFAULT; 152 default: return SessionStartupPref::DEFAULT;
150 } 153 }
151 } 154 }
152 155
153 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} 156 SessionStartupPref::SessionStartupPref(Type type) : type(type) {}
154 157
155 SessionStartupPref::SessionStartupPref(const SessionStartupPref& other) = 158 SessionStartupPref::SessionStartupPref(const SessionStartupPref& other) =
156 default; 159 default;
157 160
158 SessionStartupPref::~SessionStartupPref() {} 161 SessionStartupPref::~SessionStartupPref() {}
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