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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_CURRENTLY_ON(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 void OnSSLConfigChanged() override { ssl_config_changed_count_++; } |
57 ssl_config_changed_count_++; | |
58 } | |
59 | 57 |
60 protected: | 58 protected: |
61 content::TestBrowserThreadBundle thread_bundle_; | 59 content::TestBrowserThreadBundle thread_bundle_; |
62 scoped_ptr<TestingProfile> testing_profile_; | 60 scoped_ptr<TestingProfile> testing_profile_; |
63 | 61 |
64 net::ChannelIDStore::ChannelIDList channel_id_list_; | 62 net::ChannelIDStore::ChannelIDList channel_id_list_; |
65 | 63 |
66 int ssl_config_changed_count_; | 64 int ssl_config_changed_count_; |
67 }; | 65 }; |
68 | 66 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 scoped_refptr<CannedBrowsingDataChannelIDHelper> helper( | 135 scoped_refptr<CannedBrowsingDataChannelIDHelper> helper( |
138 new CannedBrowsingDataChannelIDHelper()); | 136 new CannedBrowsingDataChannelIDHelper()); |
139 | 137 |
140 ASSERT_TRUE(helper->empty()); | 138 ASSERT_TRUE(helper->empty()); |
141 helper->AddChannelID(net::ChannelIDStore::ChannelID( | 139 helper->AddChannelID(net::ChannelIDStore::ChannelID( |
142 origin, base::Time(), base::Time(), "key", "cert")); | 140 origin, base::Time(), base::Time(), "key", "cert")); |
143 ASSERT_FALSE(helper->empty()); | 141 ASSERT_FALSE(helper->empty()); |
144 helper->Reset(); | 142 helper->Reset(); |
145 ASSERT_TRUE(helper->empty()); | 143 ASSERT_TRUE(helper->empty()); |
146 } | 144 } |
OLD | NEW |