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_setting_change.h" | 11 #include "chrome/browser/protector/base_setting_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 "grit/chromium_strings.h" | 15 #include "grit/chromium_strings.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 | 19 |
20 namespace protector { | 20 namespace protector { |
21 | 21 |
22 // STARTUP_SETTING and session startup settings change tracked by Protector. | 22 // Session startup settings change tracked by Protector. |
23 class SessionStartupChange : public BaseSettingChange { | 23 class SessionStartupChange : public BaseSettingChange { |
24 public: | 24 public: |
25 SessionStartupChange(const SessionStartupPref& actual, | 25 SessionStartupChange(const SessionStartupPref& actual, |
26 const SessionStartupPref& backup); | 26 const SessionStartupPref& backup); |
27 | 27 |
28 // BaseSettingChange overrides: | 28 // BaseSettingChange overrides: |
29 virtual bool Init(Profile* profile) OVERRIDE; | 29 virtual bool Init(Profile* profile) OVERRIDE; |
30 virtual void Apply(Browser* browser) OVERRIDE; | 30 virtual void Apply(Browser* browser) OVERRIDE; |
31 virtual void Discard(Browser* browser) OVERRIDE; | 31 virtual void Discard(Browser* browser) OVERRIDE; |
32 virtual void Timeout() OVERRIDE; | 32 virtual void Timeout() OVERRIDE; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return l10n_util::GetStringUTF16(IDS_KEEP_SETTING); | 138 return l10n_util::GetStringUTF16(IDS_KEEP_SETTING); |
139 } | 139 } |
140 | 140 |
141 BaseSettingChange* CreateSessionStartupChange( | 141 BaseSettingChange* CreateSessionStartupChange( |
142 const SessionStartupPref& actual, | 142 const SessionStartupPref& actual, |
143 const SessionStartupPref& backup) { | 143 const SessionStartupPref& backup) { |
144 return new SessionStartupChange(actual, backup); | 144 return new SessionStartupChange(actual, backup); |
145 } | 145 } |
146 | 146 |
147 } // namespace protector | 147 } // namespace protector |
OLD | NEW |