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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 2133893002: [MD settings] disable clear browsing data while it is running (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dpapad@ review Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.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) 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_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 int origin_type_mask; 168 int origin_type_mask;
169 }; 169 };
170 170
171 struct TimeRange { 171 struct TimeRange {
172 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} 172 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {}
173 173
174 base::Time begin; 174 base::Time begin;
175 base::Time end; 175 base::Time end;
176 }; 176 };
177 177
178 // Observer is notified when the removal is done. Done means keywords have 178 // Observer is notified when the removal is active and when it's done.
179 // been deleted, cache cleared and all other tasks scheduled.
180 class Observer { 179 class Observer {
181 public: 180 public:
182 virtual void OnBrowsingDataRemoverDone() = 0; 181 // Whether removal is active. Note that not having an active removal is not
182 // same as completing a removal. That is why the removing status is separate
183 // from the done message.
184 virtual void OnBrowsingDataRemoving(bool is_removing) {}
msramek 2016/07/11 17:00:01 Please add a comment here to note that this method
Dan Beam 2016/07/11 21:10:57 Done.
185
186 // Done means keywords have been deleted, cache cleared and all other
187 // removal tasks are scheduled.
188 virtual void OnBrowsingDataRemoverDone() {}
183 189
184 protected: 190 protected:
185 virtual ~Observer() {} 191 virtual ~Observer() {}
186 }; 192 };
187 193
188 using Callback = base::Callback<void(const NotificationDetails&)>; 194 using Callback = base::Callback<void(const NotificationDetails&)>;
189 using CallbackSubscription = std::unique_ptr< 195 using CallbackSubscription = std::unique_ptr<
190 base::CallbackList<void(const NotificationDetails&)>::Subscription>; 196 base::CallbackList<void(const NotificationDetails&)>::Subscription>;
191 197
192 // The completion inhibitor can artificially delay completion of the browsing 198 // The completion inhibitor can artificially delay completion of the browsing
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 // not initialised, so the registry must be mocked out. 503 // not initialised, so the registry must be mocked out.
498 std::unique_ptr<WebappRegistry> webapp_registry_; 504 std::unique_ptr<WebappRegistry> webapp_registry_;
499 #endif 505 #endif
500 506
501 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; 507 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_;
502 508
503 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 509 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
504 }; 510 };
505 511
506 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 512 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698