| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 pref->urls.push_back(fixed_url); | 38 pref->urls.push_back(fixed_url); |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 // static | 45 // static |
| 46 void SessionStartupPref::RegisterProfilePrefs( | 46 void SessionStartupPref::RegisterProfilePrefs( |
| 47 user_prefs::PrefRegistrySyncable* registry) { | 47 user_prefs::PrefRegistrySyncable* registry) { |
| 48 #if defined(OS_IOS) || defined(OS_ANDROID) | 48 #if defined(OS_ANDROID) |
| 49 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS; | 49 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS; |
| 50 #else | 50 #else |
| 51 uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; | 51 uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; |
| 52 #endif | 52 #endif |
| 53 registry->RegisterIntegerPref(prefs::kRestoreOnStartup, | 53 registry->RegisterIntegerPref(prefs::kRestoreOnStartup, |
| 54 TypeToPrefValue(GetDefaultStartupType()), | 54 TypeToPrefValue(GetDefaultStartupType()), |
| 55 flags); | 55 flags); |
| 56 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, flags); | 56 registry->RegisterListPref(prefs::kURLsToRestoreOnStartup, flags); |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 default: return SessionStartupPref::DEFAULT; | 153 default: return SessionStartupPref::DEFAULT; |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 | 156 |
| 157 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} | 157 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} |
| 158 | 158 |
| 159 SessionStartupPref::SessionStartupPref(const SessionStartupPref& other) = | 159 SessionStartupPref::SessionStartupPref(const SessionStartupPref& other) = |
| 160 default; | 160 default; |
| 161 | 161 |
| 162 SessionStartupPref::~SessionStartupPref() {} | 162 SessionStartupPref::~SessionStartupPref() {} |
| OLD | NEW |