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; | |
gab
2016/12/06 19:35:04
Why do you need this? They're in the public header
vasilii
2016/12/06 19:42:11
The context is here https://groups.google.com/a/ch
gab
2016/12/06 19:51:44
This thread is huge, any specific entry? The OP is
gab
2016/12/07 16:26:27
Ok I see [1] and in particular [2], but why wasn't
Alexander Yashkin
2016/12/09 08:19:52
I beleive vasilii answered this question below.
gab
2016/12/09 18:18:27
Right he replied:
"""Before base::FundamentalValue
Alexander Yashkin
2016/12/11 16:34:32
Ok, changed to enum.
| |
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 |