Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: net/ssl/default_channel_id_store_unittest.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/ssl/default_channel_id_store.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/location.h" 14 #include "base/location.h"
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
16 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
17 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
18 #include "base/thread_task_runner_handle.h" 19 #include "base/thread_task_runner_handle.h"
(...skipping 19 matching lines...) Expand all
38 39
39 class AsyncGetChannelIDHelper { 40 class AsyncGetChannelIDHelper {
40 public: 41 public:
41 AsyncGetChannelIDHelper() : called_(false) {} 42 AsyncGetChannelIDHelper() : called_(false) {}
42 43
43 void Callback(int err, 44 void Callback(int err,
44 const std::string& server_identifier, 45 const std::string& server_identifier,
45 scoped_ptr<crypto::ECPrivateKey> key_result) { 46 scoped_ptr<crypto::ECPrivateKey> key_result) {
46 err_ = err; 47 err_ = err;
47 server_identifier_ = server_identifier; 48 server_identifier_ = server_identifier;
48 key_ = key_result.Pass(); 49 key_ = std::move(key_result);
49 called_ = true; 50 called_ = true;
50 } 51 }
51 52
52 int err_; 53 int err_;
53 std::string server_identifier_; 54 std::string server_identifier_;
54 scoped_ptr<crypto::ECPrivateKey> key_; 55 scoped_ptr<crypto::ECPrivateKey> key_;
55 bool called_; 56 bool called_;
56 }; 57 };
57 58
58 void GetAllCallback( 59 void GetAllCallback(
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ++channel_id; 454 ++channel_id;
454 EXPECT_EQ("copied.com", channel_id->server_identifier()); 455 EXPECT_EQ("copied.com", channel_id->server_identifier());
455 EXPECT_TRUE(KeysEqual(copied_key.get(), channel_id->key())); 456 EXPECT_TRUE(KeysEqual(copied_key.get(), channel_id->key()));
456 457
457 ++channel_id; 458 ++channel_id;
458 EXPECT_EQ("preexisting.com", channel_id->server_identifier()); 459 EXPECT_EQ("preexisting.com", channel_id->server_identifier());
459 EXPECT_TRUE(KeysEqual(preexisting_key.get(), channel_id->key())); 460 EXPECT_TRUE(KeysEqual(preexisting_key.get(), channel_id->key()));
460 } 461 }
461 462
462 } // namespace net 463 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/default_channel_id_store.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698