| 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 23 matching lines...) Expand all Loading... |
| 34 std::string url_text; | 34 std::string url_text; |
| 35 if (url_list->GetString(i, &url_text)) { | 35 if (url_list->GetString(i, &url_text)) { |
| 36 GURL fixed_url = url_formatter::FixupURL(url_text, std::string()); | 36 GURL fixed_url = url_formatter::FixupURL(url_text, std::string()); |
| 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 const int SessionStartupPref::kPrefValueLast; |
| 45 const int SessionStartupPref::kPrefValueURLs; |
| 46 const int SessionStartupPref::kPrefValueNewTab; |
| 47 const int SessionStartupPref::kPrefValueMax; |
| 48 |
| 44 // static | 49 // static |
| 45 void SessionStartupPref::RegisterProfilePrefs( | 50 void SessionStartupPref::RegisterProfilePrefs( |
| 46 user_prefs::PrefRegistrySyncable* registry) { | 51 user_prefs::PrefRegistrySyncable* registry) { |
| 47 #if defined(OS_IOS) || defined(OS_ANDROID) | 52 #if defined(OS_IOS) || defined(OS_ANDROID) |
| 48 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS; | 53 uint32_t flags = PrefRegistry::NO_REGISTRATION_FLAGS; |
| 49 #else | 54 #else |
| 50 uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; | 55 uint32_t flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; |
| 51 #endif | 56 #endif |
| 52 registry->RegisterIntegerPref(prefs::kRestoreOnStartup, | 57 registry->RegisterIntegerPref(prefs::kRestoreOnStartup, |
| 53 TypeToPrefValue(GetDefaultStartupType()), | 58 TypeToPrefValue(GetDefaultStartupType()), |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 default: return SessionStartupPref::DEFAULT; | 157 default: return SessionStartupPref::DEFAULT; |
| 153 } | 158 } |
| 154 } | 159 } |
| 155 | 160 |
| 156 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} | 161 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} |
| 157 | 162 |
| 158 SessionStartupPref::SessionStartupPref(const SessionStartupPref& other) = | 163 SessionStartupPref::SessionStartupPref(const SessionStartupPref& other) = |
| 159 default; | 164 default; |
| 160 | 165 |
| 161 SessionStartupPref::~SessionStartupPref() {} | 166 SessionStartupPref::~SessionStartupPref() {} |
| OLD | NEW |