| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/prefs/session_startup_pref.h" | 10 #include "chrome/browser/prefs/session_startup_pref.h" |
| 11 #include "chrome/browser/protector/base_prefs_change.h" | 11 #include "chrome/browser/protector/base_prefs_change.h" |
| 12 #include "chrome/browser/protector/histograms.h" | 12 #include "chrome/browser/protector/histograms.h" |
| 13 #include "chrome/browser/protector/protector_service.h" | 13 #include "chrome/browser/protector/protector_service.h" |
| 14 #include "chrome/browser/protector/protector_service_factory.h" | 14 #include "chrome/browser/protector/protector_service_factory.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "grit/chromium_strings.h" | 16 #include "grit/chromium_strings.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 | 20 |
| 21 namespace protector { | 21 namespace protector { |
| 22 | 22 |
| 23 // STARTUP_SETTING and session startup settings change tracked by Protector. | 23 // Session startup settings change tracked by Protector. |
| 24 class SessionStartupChange : public BasePrefsChange { | 24 class SessionStartupChange : public BasePrefsChange { |
| 25 public: | 25 public: |
| 26 SessionStartupChange(const SessionStartupPref& actual, | 26 SessionStartupChange(const SessionStartupPref& actual, |
| 27 const SessionStartupPref& backup); | 27 const SessionStartupPref& backup); |
| 28 | 28 |
| 29 // BaseSettingChange overrides: | 29 // BaseSettingChange overrides: |
| 30 virtual bool Init(Profile* profile) OVERRIDE; | 30 virtual bool Init(Profile* profile) OVERRIDE; |
| 31 virtual void Apply(Browser* browser) OVERRIDE; | 31 virtual void Apply(Browser* browser) OVERRIDE; |
| 32 virtual void Discard(Browser* browser) OVERRIDE; | 32 virtual void Discard(Browser* browser) OVERRIDE; |
| 33 virtual void Timeout() OVERRIDE; | 33 virtual void Timeout() OVERRIDE; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 return l10n_util::GetStringUTF16(IDS_KEEP_SETTING); | 143 return l10n_util::GetStringUTF16(IDS_KEEP_SETTING); |
| 144 } | 144 } |
| 145 | 145 |
| 146 BaseSettingChange* CreateSessionStartupChange( | 146 BaseSettingChange* CreateSessionStartupChange( |
| 147 const SessionStartupPref& actual, | 147 const SessionStartupPref& actual, |
| 148 const SessionStartupPref& backup) { | 148 const SessionStartupPref& backup) { |
| 149 return new SessionStartupChange(actual, backup); | 149 return new SessionStartupChange(actual, backup); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace protector | 152 } // namespace protector |
| OLD | NEW |