OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string_piece.h" | 9 #include "base/string_piece.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/defaults.h" | 11 #include "chrome/browser/defaults.h" |
12 #include "chrome/browser/net/url_fixer_upper.h" | 12 #include "chrome/browser/net/url_fixer_upper.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/prefs/scoped_pref_update.h" | 14 #include "chrome/browser/prefs/scoped_pref_update.h" |
15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // For historical reasons the enum and value registered in the prefs don't line | 20 // For historical reasons the enum and value registered in the prefs don't line |
21 // up. These are the values registered in prefs. | 21 // up. These are the values registered in prefs. |
22 const int kPrefValueDefault = 0; | 22 const int kPrefValueDefault = 0; |
23 const int kPrefValueLast = 1; | 23 const int kPrefValueLast = 1; |
24 const int kPrefValueURLs = 4; | 24 const int kPrefValueURLs = 4; |
25 | 25 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 prefs->FindPreference(prefs::kURLsToRestoreOnStartup); | 129 prefs->FindPreference(prefs::kURLsToRestoreOnStartup); |
130 DCHECK(pref_urls); | 130 DCHECK(pref_urls); |
131 return pref_urls->IsManaged(); | 131 return pref_urls->IsManaged(); |
132 } | 132 } |
133 | 133 |
134 SessionStartupPref::SessionStartupPref() : type(DEFAULT) {} | 134 SessionStartupPref::SessionStartupPref() : type(DEFAULT) {} |
135 | 135 |
136 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} | 136 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} |
137 | 137 |
138 SessionStartupPref::~SessionStartupPref() {} | 138 SessionStartupPref::~SessionStartupPref() {} |
OLD | NEW |