| 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/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 channel_id_store->SetChannelID("https://www.google.com:443", | 41 channel_id_store->SetChannelID("https://www.google.com:443", |
| 42 base::Time(), base::Time(), | 42 base::Time(), base::Time(), |
| 43 "key", "cert"); | 43 "key", "cert"); |
| 44 channel_id_store->SetChannelID("https://www.youtube.com:443", | 44 channel_id_store->SetChannelID("https://www.youtube.com:443", |
| 45 base::Time(), base::Time(), | 45 base::Time(), base::Time(), |
| 46 "key", "cert"); | 46 "key", "cert"); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void FetchCallback( | 49 void FetchCallback( |
| 50 const net::ChannelIDStore::ChannelIDList& channel_ids) { | 50 const net::ChannelIDStore::ChannelIDList& channel_ids) { |
| 51 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 51 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 52 channel_id_list_ = channel_ids; | 52 channel_id_list_ = channel_ids; |
| 53 } | 53 } |
| 54 | 54 |
| 55 // net::SSLConfigService::Observer implementation: | 55 // net::SSLConfigService::Observer implementation: |
| 56 virtual void OnSSLConfigChanged() OVERRIDE { | 56 virtual void OnSSLConfigChanged() OVERRIDE { |
| 57 ssl_config_changed_count_++; | 57 ssl_config_changed_count_++; |
| 58 } | 58 } |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 content::TestBrowserThreadBundle thread_bundle_; | 61 content::TestBrowserThreadBundle thread_bundle_; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 scoped_refptr<CannedBrowsingDataChannelIDHelper> helper( | 135 scoped_refptr<CannedBrowsingDataChannelIDHelper> helper( |
| 136 new CannedBrowsingDataChannelIDHelper()); | 136 new CannedBrowsingDataChannelIDHelper()); |
| 137 | 137 |
| 138 ASSERT_TRUE(helper->empty()); | 138 ASSERT_TRUE(helper->empty()); |
| 139 helper->AddChannelID(net::ChannelIDStore::ChannelID( | 139 helper->AddChannelID(net::ChannelIDStore::ChannelID( |
| 140 origin, base::Time(), base::Time(), "key", "cert")); | 140 origin, base::Time(), base::Time(), "key", "cert")); |
| 141 ASSERT_FALSE(helper->empty()); | 141 ASSERT_FALSE(helper->empty()); |
| 142 helper->Reset(); | 142 helper->Reset(); |
| 143 ASSERT_TRUE(helper->empty()); | 143 ASSERT_TRUE(helper->empty()); |
| 144 } | 144 } |
| OLD | NEW |