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

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

Issue 8384036: Delete GlobarError and Protector only after the error was removed from global list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/protector/protector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PROTECTOR_H_ 5 #ifndef CHROME_BROWSER_PROTECTOR_PROTECTOR_H_
6 #define CHROME_BROWSER_PROTECTOR_PROTECTOR_H_ 6 #define CHROME_BROWSER_PROTECTOR_PROTECTOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 26 matching lines...) Expand all
37 TemplateURLService* GetTemplateURLService(); 37 TemplateURLService* GetTemplateURLService();
38 38
39 // Shows global error about the specified change. Ownership of the change 39 // Shows global error about the specified change. Ownership of the change
40 // is passed to the error object. 40 // is passed to the error object.
41 void ShowChange(SettingChange* change); 41 void ShowChange(SettingChange* change);
42 42
43 // SettingsChangeGlobalErrorDelegate implementation. 43 // SettingsChangeGlobalErrorDelegate implementation.
44 virtual void OnApplyChanges() OVERRIDE; 44 virtual void OnApplyChanges() OVERRIDE;
45 virtual void OnDiscardChanges() OVERRIDE; 45 virtual void OnDiscardChanges() OVERRIDE;
46 virtual void OnDecisionTimeout() OVERRIDE; 46 virtual void OnDecisionTimeout() OVERRIDE;
47 virtual void OnRemovedFromProfile() OVERRIDE;
47 48
48 private: 49 private:
49 friend class DeleteTask<Protector>; 50 friend class DeleteTask<Protector>;
50 51
51 // The object can only be allocated and destroyed on heap. 52 // The object can only be allocated and destroyed on heap.
52 virtual ~Protector(); 53 virtual ~Protector();
53 54
54 // Common handler for error delegate handlers. Calls the specified method 55 // Common handler for error delegate handlers. Calls the specified method
55 // on each change we showed error for. 56 // on each change we showed error for.
56 void OnChangesAction(SettingChangeAction action); 57 void OnChangesAction(SettingChangeAction action);
57 58
58 // Pointer to error bubble controller. Indicates if we're showing change 59 // Pointer to error bubble controller. Indicates if we're showing change
59 // notification to user. Owns itself. 60 // notification to user. Owns itself.
60 scoped_ptr<SettingsChangeGlobalError> error_; 61 scoped_ptr<SettingsChangeGlobalError> error_;
61 62
62 // Profile which settings we are protecting. 63 // Profile which settings we are protecting.
63 Profile* profile_; 64 Profile* profile_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(Protector); 66 DISALLOW_COPY_AND_ASSIGN(Protector);
66 }; 67 };
67 68
68 // Signs string value with protector's key. 69 // Signs string value with protector's key.
69 std::string SignSetting(const std::string& value); 70 std::string SignSetting(const std::string& value);
70 71
71 } // namespace protector 72 } // namespace protector
72 73
73 #endif // CHROME_BROWSER_PROTECTOR_PROTECTOR_H_ 74 #endif // CHROME_BROWSER_PROTECTOR_PROTECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/protector/protector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698