Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: chrome/browser/protector/base_setting_change.h

Issue 10065016: [protector] Refactoring of --no-protector code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ 5 #ifndef CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_
6 #define CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ 6 #define CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Returns true if |this| is a result of merging some changes with |other|. 48 // Returns true if |this| is a result of merging some changes with |other|.
49 virtual bool Contains(const BaseSettingChange* other) const; 49 virtual bool Contains(const BaseSettingChange* other) const;
50 50
51 // Applies initial actions to the setting if needed. Must be called before 51 // Applies initial actions to the setting if needed. Must be called before
52 // any other calls are made, including text getters. 52 // any other calls are made, including text getters.
53 // Returns true if initialization was successful. 53 // Returns true if initialization was successful.
54 // Associates this change with |profile| instance so overrides must call the 54 // Associates this change with |profile| instance so overrides must call the
55 // base method. 55 // base method.
56 virtual bool Init(Profile* profile); 56 virtual bool Init(Profile* profile);
57 57
58 // Called instead of Init when ProtectorService is disabled. No other members
59 // are called in that case.
60 virtual void InitWhenDisabled(Profile* profile);
61
58 // Persists new setting if needed. |browser| is the Browser instance from 62 // Persists new setting if needed. |browser| is the Browser instance from
59 // which the user action originates. 63 // which the user action originates.
60 virtual void Apply(Browser* browser); 64 virtual void Apply(Browser* browser);
61 65
62 // Restores old setting if needed. |browser| is the Browser instance from 66 // Restores old setting if needed. |browser| is the Browser instance from
63 // which the user action originates. 67 // which the user action originates.
64 virtual void Discard(Browser* browser); 68 virtual void Discard(Browser* browser);
65 69
66 // Indicates that user has ignored this change and timeout has passed. 70 // Indicates that user has ignored this change and timeout has passed.
67 virtual void Timeout(); 71 virtual void Timeout();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const SessionStartupPref& backup_startup_pref, 142 const SessionStartupPref& backup_startup_pref,
139 const PinnedTabCodec::Tabs& backup_pinned_tabs); 143 const PinnedTabCodec::Tabs& backup_pinned_tabs);
140 144
141 // Allocates and initializes BaseSettingChange implementation for an unknown 145 // Allocates and initializes BaseSettingChange implementation for an unknown
142 // preferences change with invalid backup. 146 // preferences change with invalid backup.
143 BaseSettingChange* CreatePrefsBackupInvalidChange(); 147 BaseSettingChange* CreatePrefsBackupInvalidChange();
144 148
145 } // namespace protector 149 } // namespace protector
146 150
147 #endif // CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ 151 #endif // CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/protector/base_prefs_change.cc ('k') | chrome/browser/protector/base_setting_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698