| 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 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "net/ssl/channel_id_service.h" | 12 #include "net/ssl/channel_id_service.h" |
| 13 #include "net/url_request/url_request_context.h" | 13 #include "net/url_request/url_request_context.h" |
| 14 #include "net/url_request/url_request_context_getter.h" | 14 #include "net/url_request/url_request_context_getter.h" |
| 15 | 15 |
| 16 using content::BrowserThread; | 16 using content::BrowserThread; |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 class BrowsingDataChannelIDHelperImpl | 20 class BrowsingDataChannelIDHelperImpl |
| 21 : public BrowsingDataChannelIDHelper { | 21 : public BrowsingDataChannelIDHelper { |
| 22 public: | 22 public: |
| 23 explicit BrowsingDataChannelIDHelperImpl( | 23 explicit BrowsingDataChannelIDHelperImpl( |
| 24 net::URLRequestContextGetter* request_context); | 24 net::URLRequestContextGetter* request_context); |
| 25 | 25 |
| 26 // BrowsingDataChannelIDHelper methods. | 26 // BrowsingDataChannelIDHelper methods. |
| 27 virtual void StartFetching(const FetchResultCallback& callback) OVERRIDE; | 27 virtual void StartFetching(const FetchResultCallback& callback) override; |
| 28 virtual void DeleteChannelID(const std::string& server_id) OVERRIDE; | 28 virtual void DeleteChannelID(const std::string& server_id) override; |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 virtual ~BrowsingDataChannelIDHelperImpl(); | 31 virtual ~BrowsingDataChannelIDHelperImpl(); |
| 32 | 32 |
| 33 // Fetch the certs. This must be called in the IO thread. | 33 // Fetch the certs. This must be called in the IO thread. |
| 34 void FetchOnIOThread(); | 34 void FetchOnIOThread(); |
| 35 | 35 |
| 36 void OnFetchComplete( | 36 void OnFetchComplete( |
| 37 const net::ChannelIDStore::ChannelIDList& channel_id_list); | 37 const net::ChannelIDStore::ChannelIDList& channel_id_list); |
| 38 | 38 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 for (ChannelIDMap::iterator i = channel_id_map_.begin(); | 204 for (ChannelIDMap::iterator i = channel_id_map_.begin(); |
| 205 i != channel_id_map_.end(); ++i) | 205 i != channel_id_map_.end(); ++i) |
| 206 channel_id_list.push_back(i->second); | 206 channel_id_list.push_back(i->second); |
| 207 completion_callback_.Run(channel_id_list); | 207 completion_callback_.Run(channel_id_list); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void CannedBrowsingDataChannelIDHelper::DeleteChannelID( | 210 void CannedBrowsingDataChannelIDHelper::DeleteChannelID( |
| 211 const std::string& server_id) { | 211 const std::string& server_id) { |
| 212 NOTREACHED(); | 212 NOTREACHED(); |
| 213 } | 213 } |
| OLD | NEW |