| OLD | NEW |
| 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 class Profile; |
| 15 | 15 |
| 16 // BrowsingDataChannelIDHelper is an interface for classes dealing with | 16 // BrowsingDataChannelIDHelper is an interface for classes dealing with |
| 17 // aggregating and deleting browsing data stored in the channel ID store. | 17 // 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 | 18 // 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 | 19 // initiate the flow, and it'll be notified by the callback in its UI thread at |
| 20 // some later point. | 20 // some later point. |
| 21 class BrowsingDataChannelIDHelper | 21 class BrowsingDataChannelIDHelper |
| 22 : public base::RefCountedThreadSafe<BrowsingDataChannelIDHelper> { | 22 : public base::RefCountedThreadSafe<BrowsingDataChannelIDHelper> { |
| 23 public: | 23 public: |
| 24 | |
| 25 // Create a BrowsingDataChannelIDHelper instance for the given | 24 // Create a BrowsingDataChannelIDHelper instance for the given |
| 26 // |profile|. | 25 // |profile|. |
| 27 static BrowsingDataChannelIDHelper* Create(Profile* profile); | 26 static BrowsingDataChannelIDHelper* Create(Profile* profile); |
| 28 | 27 |
| 29 typedef base::Callback< | 28 typedef base::Callback< |
| 30 void(const net::ChannelIDStore::ChannelIDList&)> | 29 void(const net::ChannelIDStore::ChannelIDList&)> |
| 31 FetchResultCallback; | 30 FetchResultCallback; |
| 32 | 31 |
| 33 // Starts the fetching process, which will notify its completion via | 32 // Starts the fetching process, which will notify its completion via |
| 34 // callback. | 33 // callback. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 typedef std::map<std::string, net::ChannelIDStore::ChannelID> | 81 typedef std::map<std::string, net::ChannelIDStore::ChannelID> |
| 83 ChannelIDMap; | 82 ChannelIDMap; |
| 84 ChannelIDMap channel_id_map_; | 83 ChannelIDMap channel_id_map_; |
| 85 | 84 |
| 86 FetchResultCallback completion_callback_; | 85 FetchResultCallback completion_callback_; |
| 87 | 86 |
| 88 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataChannelIDHelper); | 87 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataChannelIDHelper); |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_ | 90 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_CHANNEL_ID_HELPER_H_ |
| OLD | NEW |