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

Side by Side Diff: chrome/browser/extensions/extension_messages_apitest.cc

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 base::WaitableEvent::ResetPolicy::AUTOMATIC, 1094 base::WaitableEvent::ResetPolicy::AUTOMATIC,
1095 base::WaitableEvent::InitialState::NOT_SIGNALED) {} 1095 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
1096 1096
1097 std::string CreateTlsChannelId() { 1097 std::string CreateTlsChannelId() {
1098 scoped_refptr<net::URLRequestContextGetter> request_context_getter( 1098 scoped_refptr<net::URLRequestContextGetter> request_context_getter(
1099 profile()->GetRequestContext()); 1099 profile()->GetRequestContext());
1100 std::unique_ptr<crypto::ECPrivateKey> channel_id_key; 1100 std::unique_ptr<crypto::ECPrivateKey> channel_id_key;
1101 net::ChannelIDService::Request request; 1101 net::ChannelIDService::Request request;
1102 content::BrowserThread::PostTask( 1102 content::BrowserThread::PostTask(
1103 content::BrowserThread::IO, FROM_HERE, 1103 content::BrowserThread::IO, FROM_HERE,
1104 base::Bind(&ExternallyConnectableMessagingWithTlsChannelIdTest:: 1104 base::BindOnce(&ExternallyConnectableMessagingWithTlsChannelIdTest::
1105 CreateDomainBoundCertOnIOThread, 1105 CreateDomainBoundCertOnIOThread,
1106 base::Unretained(this), base::Unretained(&channel_id_key), 1106 base::Unretained(this),
1107 base::Unretained(&request), request_context_getter)); 1107 base::Unretained(&channel_id_key),
1108 base::Unretained(&request), request_context_getter));
1108 tls_channel_id_created_.Wait(); 1109 tls_channel_id_created_.Wait();
1109 // Create the expected value. 1110 // Create the expected value.
1110 std::vector<uint8_t> spki_vector; 1111 std::vector<uint8_t> spki_vector;
1111 if (!channel_id_key->ExportPublicKey(&spki_vector)) 1112 if (!channel_id_key->ExportPublicKey(&spki_vector))
1112 return std::string(); 1113 return std::string();
1113 base::StringPiece spki(reinterpret_cast<char*>(spki_vector.data()), 1114 base::StringPiece spki(reinterpret_cast<char*>(spki_vector.data()),
1114 spki_vector.size()); 1115 spki_vector.size());
1115 base::DictionaryValue jwk_value; 1116 base::DictionaryValue jwk_value;
1116 net::JwkSerializer::ConvertSpkiFromDerToJwk(spki, &jwk_value); 1117 net::JwkSerializer::ConvertSpkiFromDerToJwk(spki, &jwk_value);
1117 std::string tls_channel_id_value; 1118 std::string tls_channel_id_value;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 ASSERT_TRUE(content::ExecuteScriptAndExtractInt( 1358 ASSERT_TRUE(content::ExecuteScriptAndExtractInt(
1358 background_contents, 1359 background_contents,
1359 "window.domAutomationController.send(window.messageCount);", 1360 "window.domAutomationController.send(window.messageCount);",
1360 &message_count)); 1361 &message_count));
1361 EXPECT_EQ(1, message_count); 1362 EXPECT_EQ(1, message_count);
1362 } 1363 }
1363 1364
1364 } // namespace 1365 } // namespace
1365 1366
1366 }; // namespace extensions 1367 }; // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698