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

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

Issue 508223002: Remove Profile dependency from browsing_data_channel_id_helper.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_channel_id_helper.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CHANNEL_ID_HELPER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "net/ssl/channel_id_store.h" 12 #include "net/ssl/channel_id_store.h"
13 13
14 class Profile; 14 namespace net {
15 class URLRequestContextGetter;
16 }
15 17
16 // BrowsingDataChannelIDHelper is an interface for classes dealing with 18 // BrowsingDataChannelIDHelper is an interface for classes dealing with
17 // aggregating and deleting browsing data stored in the channel ID store. 19 // aggregating and deleting browsing data stored in the channel ID store.
18 // A client of this class need to call StartFetching from the UI thread to 20 // A client of this class need to call StartFetching from the UI thread to
19 // initiate the flow, and it'll be notified by the callback in its UI thread at 21 // initiate the flow, and it'll be notified by the callback in its UI thread at
20 // some later point. 22 // some later point.
21 class BrowsingDataChannelIDHelper 23 class BrowsingDataChannelIDHelper
22 : public base::RefCountedThreadSafe<BrowsingDataChannelIDHelper> { 24 : public base::RefCountedThreadSafe<BrowsingDataChannelIDHelper> {
23 public: 25 public:
24 // Create a BrowsingDataChannelIDHelper instance for the given 26 // Create a BrowsingDataChannelIDHelper instance for the given
25 // |profile|. 27 // |request_context|.
26 static BrowsingDataChannelIDHelper* Create(Profile* profile); 28 static BrowsingDataChannelIDHelper* Create(
29 net::URLRequestContextGetter* request_context);
27 30
28 typedef base::Callback< 31 typedef base::Callback<
29 void(const net::ChannelIDStore::ChannelIDList&)> 32 void(const net::ChannelIDStore::ChannelIDList&)>
30 FetchResultCallback; 33 FetchResultCallback;
31 34
32 // Starts the fetching process, which will notify its completion via 35 // Starts the fetching process, which will notify its completion via
33 // callback. 36 // callback.
34 // This must be called only in the UI thread. 37 // This must be called only in the UI thread.
35 virtual void StartFetching(const FetchResultCallback& callback) = 0; 38 virtual void StartFetching(const FetchResultCallback& callback) = 0;
36 // Requests a single channel ID to be deleted. This must be called in 39 // Requests a single channel ID to be deleted. This must be called in
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 typedef std::map<std::string, net::ChannelIDStore::ChannelID> 84 typedef std::map<std::string, net::ChannelIDStore::ChannelID>
82 ChannelIDMap; 85 ChannelIDMap;
83 ChannelIDMap channel_id_map_; 86 ChannelIDMap channel_id_map_;
84 87
85 FetchResultCallback completion_callback_; 88 FetchResultCallback completion_callback_;
86 89
87 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataChannelIDHelper); 90 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataChannelIDHelper);
88 }; 91 };
89 92
90 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_ 93 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_channel_id_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698