| 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 "net/ssl/default_channel_id_store.h" | 5 #include "net/ssl/default_channel_id_store.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 const ChannelIDStore::ChannelIDList& result) { | 62 const ChannelIDStore::ChannelIDList& result) { |
| 63 *dest = result; | 63 *dest = result; |
| 64 } | 64 } |
| 65 | 65 |
| 66 class MockPersistentStore | 66 class MockPersistentStore |
| 67 : public DefaultChannelIDStore::PersistentStore { | 67 : public DefaultChannelIDStore::PersistentStore { |
| 68 public: | 68 public: |
| 69 MockPersistentStore(); | 69 MockPersistentStore(); |
| 70 | 70 |
| 71 // DefaultChannelIDStore::PersistentStore implementation. | 71 // DefaultChannelIDStore::PersistentStore implementation. |
| 72 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; | 72 virtual void Load(const LoadedCallback& loaded_callback) override; |
| 73 virtual void AddChannelID( | 73 virtual void AddChannelID( |
| 74 const DefaultChannelIDStore::ChannelID& channel_id) OVERRIDE; | 74 const DefaultChannelIDStore::ChannelID& channel_id) override; |
| 75 virtual void DeleteChannelID( | 75 virtual void DeleteChannelID( |
| 76 const DefaultChannelIDStore::ChannelID& channel_id) OVERRIDE; | 76 const DefaultChannelIDStore::ChannelID& channel_id) override; |
| 77 virtual void SetForceKeepSessionState() OVERRIDE; | 77 virtual void SetForceKeepSessionState() override; |
| 78 | 78 |
| 79 protected: | 79 protected: |
| 80 virtual ~MockPersistentStore(); | 80 virtual ~MockPersistentStore(); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 typedef std::map<std::string, DefaultChannelIDStore::ChannelID> | 83 typedef std::map<std::string, DefaultChannelIDStore::ChannelID> |
| 84 ChannelIDMap; | 84 ChannelIDMap; |
| 85 | 85 |
| 86 ChannelIDMap channel_ids_; | 86 ChannelIDMap channel_ids_; |
| 87 }; | 87 }; |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 ++channel_id; | 546 ++channel_id; |
| 547 EXPECT_EQ("copied.com", channel_id->server_identifier()); | 547 EXPECT_EQ("copied.com", channel_id->server_identifier()); |
| 548 EXPECT_EQ("g", channel_id->private_key()); | 548 EXPECT_EQ("g", channel_id->private_key()); |
| 549 | 549 |
| 550 ++channel_id; | 550 ++channel_id; |
| 551 EXPECT_EQ("preexisting.com", channel_id->server_identifier()); | 551 EXPECT_EQ("preexisting.com", channel_id->server_identifier()); |
| 552 EXPECT_EQ("a", channel_id->private_key()); | 552 EXPECT_EQ("a", channel_id->private_key()); |
| 553 } | 553 } |
| 554 | 554 |
| 555 } // namespace net | 555 } // namespace net |
| OLD | NEW |