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

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h

Issue 2906103002: Post-cleanup settings reset. (Closed)
Patch Set: Rebase Created 3 years, 6 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI N_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI N_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI N_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER_WI N_H_
7 7
8 // NOTE: the actual implementation will be handled in a separate CL. These 8 // NOTE: the actual implementation will be handled in a separate CL. These
9 // changes are only here to enable testing. 9 // changes are only here to enable testing.
10 10
11 // DO NOT SUBMIT. Please ignore changes to this file for the moment.
12
13 #include <memory>
14
15 #include "base/callback.h"
11 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
12 #include "base/macros.h" 17 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
14 #include "base/observer_list.h" 19 #include "base/observer_list.h"
15 #include "base/threading/thread_checker.h" 20 #include "base/threading/thread_checker.h"
16 21
17 // Remove these once one_shot_timer_for_testing_ is removed. 22 // Remove these once one_shot_timer_for_testing_ is removed.
18 #include "base/time/time.h" 23 #include "base/time/time.h"
19 #include "base/timer/timer.h" 24 #include "base/timer/timer.h"
20 25
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 static ChromeCleanerController* GetRawInstanceForTesting(); 103 static ChromeCleanerController* GetRawInstanceForTesting();
99 104
100 private: 105 private:
101 friend class base::RefCounted<ChromeCleanerController>; 106 friend class base::RefCounted<ChromeCleanerController>;
102 107
103 ChromeCleanerController(); 108 ChromeCleanerController();
104 ~ChromeCleanerController(); 109 ~ChromeCleanerController();
105 110
106 void OnCleanupFinished(); 111 void OnCleanupFinished();
107 112
113 void FinalizeCleanup();
114
108 void NotifyObserver(Observer* observer) const; 115 void NotifyObserver(Observer* observer) const;
109 void NotifyAllObservers() const; 116 void NotifyAllObservers() const;
110 void SetKeepAlive(bool keep_alive); 117 void SetKeepAlive(bool keep_alive);
111 118
112 State state_ = State::kIdle; 119 State state_ = State::kIdle;
113 120
114 IdleReason idle_reason_ = IdleReason::kInitialState; 121 IdleReason idle_reason_ = IdleReason::kInitialState;
115 122
116 base::ObserverList<Observer> observer_list_; 123 base::ObserverList<Observer> observer_list_;
117 124
118 // Used to indicate that this instance needs to be kept alive. The instance 125 // Used to indicate that this instance needs to be kept alive. The instance
119 // should not be destroyed while in any of the |kScanning|, |kInfected|, or 126 // should not be destroyed while in any of the |kScanning|, |kInfected|, or
120 // |kCleaning| states, which are the states where we have an active IPC to the 127 // |kCleaning| states, which are the states where we have an active IPC to the
121 // Chrome Cleaner process. 128 // Chrome Cleaner process.
122 bool keep_alive_ = false; 129 bool keep_alive_ = false;
123 130
124 // DO NOT SUBMIT 131 // DO NOT SUBMIT
125 base::OneShotTimer one_shot_timer_for_testing_; 132 base::OneShotTimer one_shot_timer_for_testing_;
126 133
127 THREAD_CHECKER(thread_checker_); 134 THREAD_CHECKER(thread_checker_);
128 135
129 DISALLOW_COPY_AND_ASSIGN(ChromeCleanerController); 136 DISALLOW_COPY_AND_ASSIGN(ChromeCleanerController);
130 }; 137 };
131 138
132 } // namespace safe_browsing 139 } // namespace safe_browsing
133 140
134 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER _WIN_H_ 141 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_CHROME_CLEANER_CONTROLLER _WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698