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

Side by Side Diff: ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add header Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ 5 #ifndef IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_
6 #define IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ 6 #define IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_
7 7
8 #include <set> 8 #include <set>
noyau (Ping after 24h) 2016/04/07 13:34:04 #include <memory>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/sequenced_task_runner_helpers.h" 14 #include "base/sequenced_task_runner_helpers.h"
15 #include "base/task/cancelable_task_tracker.h" 15 #include "base/task/cancelable_task_tracker.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "components/prefs/pref_member.h" 17 #include "components/prefs/pref_member.h"
18 #include "components/search_engines/template_url_service.h" 18 #include "components/search_engines/template_url_service.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // been deleted, cache cleared and all other tasks scheduled. 102 // been deleted, cache cleared and all other tasks scheduled.
103 class Observer { 103 class Observer {
104 public: 104 public:
105 virtual void OnIOSChromeBrowsingDataRemoverDone() = 0; 105 virtual void OnIOSChromeBrowsingDataRemoverDone() = 0;
106 106
107 protected: 107 protected:
108 virtual ~Observer() {} 108 virtual ~Observer() {}
109 }; 109 };
110 110
111 using Callback = base::Callback<void(const NotificationDetails&)>; 111 using Callback = base::Callback<void(const NotificationDetails&)>;
112 using CallbackSubscription = scoped_ptr< 112 using CallbackSubscription = std::unique_ptr<
113 base::CallbackList<void(const NotificationDetails&)>::Subscription>; 113 base::CallbackList<void(const NotificationDetails&)>::Subscription>;
114 114
115 // Creates a IOSChromeBrowsingDataRemover bound to a specific period of time 115 // Creates a IOSChromeBrowsingDataRemover bound to a specific period of time
116 // (as defined via a TimePeriod). Returns a raw pointer, as 116 // (as defined via a TimePeriod). Returns a raw pointer, as
117 // IOSChromeBrowsingDataRemover retains ownership of itself, and deletes 117 // IOSChromeBrowsingDataRemover retains ownership of itself, and deletes
118 // itself once finished. 118 // itself once finished.
119 static IOSChromeBrowsingDataRemover* CreateForPeriod( 119 static IOSChromeBrowsingDataRemover* CreateForPeriod(
120 ios::ChromeBrowserState* browser_state, 120 ios::ChromeBrowserState* browser_state,
121 TimePeriod period); 121 TimePeriod period);
122 122
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 bool waiting_for_clear_passwords_ = false; 256 bool waiting_for_clear_passwords_ = false;
257 257
258 // The removal mask for the current removal operation. 258 // The removal mask for the current removal operation.
259 int remove_mask_ = 0; 259 int remove_mask_ = 0;
260 260
261 base::ObserverList<Observer> observer_list_; 261 base::ObserverList<Observer> observer_list_;
262 262
263 // Used if we need to clear history. 263 // Used if we need to clear history.
264 base::CancelableTaskTracker history_task_tracker_; 264 base::CancelableTaskTracker history_task_tracker_;
265 265
266 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; 266 std::unique_ptr<TemplateURLService::Subscription> template_url_sub_;
267 267
268 DISALLOW_COPY_AND_ASSIGN(IOSChromeBrowsingDataRemover); 268 DISALLOW_COPY_AND_ASSIGN(IOSChromeBrowsingDataRemover);
269 }; 269 };
270 270
271 #endif // IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ 271 #endif // IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698