| 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> |
| 8 |
| 7 #include <string> | 9 #include <string> |
| 8 | 10 |
| 9 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 12 #include "base/prefs/scoped_user_pref_update.h" |
| 11 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "build/build_config.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 14 #include "components/pref_registry/pref_registry_syncable.h" | 17 #include "components/pref_registry/pref_registry_syncable.h" |
| 15 #include "components/url_formatter/url_fixer.h" | 18 #include "components/url_formatter/url_fixer.h" |
| 16 | 19 |
| 17 namespace { | 20 namespace { |
| 18 | 21 |
| 19 // Converts a SessionStartupPref::Type to an integer written to prefs. | 22 // Converts a SessionStartupPref::Type to an integer written to prefs. |
| 20 int TypeToPrefValue(SessionStartupPref::Type type) { | 23 int TypeToPrefValue(SessionStartupPref::Type type) { |
| 21 switch (type) { | 24 switch (type) { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 switch (pref_value) { | 146 switch (pref_value) { |
| 144 case kPrefValueLast: return SessionStartupPref::LAST; | 147 case kPrefValueLast: return SessionStartupPref::LAST; |
| 145 case kPrefValueURLs: return SessionStartupPref::URLS; | 148 case kPrefValueURLs: return SessionStartupPref::URLS; |
| 146 default: return SessionStartupPref::DEFAULT; | 149 default: return SessionStartupPref::DEFAULT; |
| 147 } | 150 } |
| 148 } | 151 } |
| 149 | 152 |
| 150 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} | 153 SessionStartupPref::SessionStartupPref(Type type) : type(type) {} |
| 151 | 154 |
| 152 SessionStartupPref::~SessionStartupPref() {} | 155 SessionStartupPref::~SessionStartupPref() {} |
| OLD | NEW |