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

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: merge 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 int origin_type_mask; 166 int origin_type_mask;
167 }; 167 };
168 168
169 struct TimeRange { 169 struct TimeRange {
170 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {} 170 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {}
171 171
172 base::Time begin; 172 base::Time begin;
173 base::Time end; 173 base::Time end;
174 }; 174 };
175 175
176 // Observer is notified when the removal is done. Done means keywords have 176 // Observer is notified when the removal is active and when it's done.
177 // been deleted, cache cleared and all other tasks scheduled.
178 class Observer { 177 class Observer {
179 public: 178 public:
180 virtual void OnBrowsingDataRemoverDone() = 0; 179 // NOTE: DEPRECATED; talk to dbeam/msramek before using this.
180 //
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) {}
185
186 // Done means keywords have been deleted, cache cleared and all other
187 // removal tasks are scheduled.
188 virtual void OnBrowsingDataRemoverDone() {}
181 189
182 protected: 190 protected:
183 virtual ~Observer() {} 191 virtual ~Observer() {}
184 }; 192 };
185 193
186 using Callback = base::Callback<void(const NotificationDetails&)>; 194 using Callback = base::Callback<void(const NotificationDetails&)>;
187 using CallbackSubscription = std::unique_ptr< 195 using CallbackSubscription = std::unique_ptr<
188 base::CallbackList<void(const NotificationDetails&)>::Subscription>; 196 base::CallbackList<void(const NotificationDetails&)>::Subscription>;
189 197
190 // 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
495 // not initialised, so the registry must be mocked out. 503 // not initialised, so the registry must be mocked out.
496 std::unique_ptr<WebappRegistry> webapp_registry_; 504 std::unique_ptr<WebappRegistry> webapp_registry_;
497 #endif 505 #endif
498 506
499 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; 507 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_;
500 508
501 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 509 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
502 }; 510 };
503 511
504 #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