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

Side by Side Diff: chrome/browser/extensions/api/gcd_private/privet_v3_session_unittest.cc

Issue 1435303002: Temporarily add PrivetHttpClient::GetHost method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@context1
Patch Set: Created 5 years, 1 month 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 | « no previous file | chrome/browser/local_discovery/privet_http.h » ('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 "chrome/browser/extensions/api/gcd_private/privet_v3_session.h" 5 #include "chrome/browser/extensions/api/gcd_private/privet_v3_session.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "chrome/browser/local_discovery/privet_http.h" 10 #include "chrome/browser/local_discovery/privet_http.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 request_context_ = new net::TestURLRequestContextGetter( 52 request_context_ = new net::TestURLRequestContextGetter(
53 base::ThreadTaskRunnerHandle::Get()); 53 base::ThreadTaskRunnerHandle::Get());
54 } 54 }
55 55
56 MOCK_METHOD0(GetName, const std::string&()); 56 MOCK_METHOD0(GetName, const std::string&());
57 MOCK_METHOD1( 57 MOCK_METHOD1(
58 CreateInfoOperationPtr, 58 CreateInfoOperationPtr,
59 PrivetJSONOperation*(const PrivetJSONOperation::ResultCallback&)); 59 PrivetJSONOperation*(const PrivetJSONOperation::ResultCallback&));
60 MOCK_METHOD2(SwitchToHttps, void(uint16_t, const net::SHA256HashValue&)); 60 MOCK_METHOD2(SwitchToHttps, void(uint16_t, const net::SHA256HashValue&));
61 MOCK_CONST_METHOD0(IsInHttpsMode, bool()); 61 MOCK_CONST_METHOD0(IsInHttpsMode, bool());
62 MOCK_CONST_METHOD0(GetHost, std::string());
62 63
63 void RefreshPrivetToken( 64 void RefreshPrivetToken(
64 const PrivetURLFetcher::TokenCallback& callback) override { 65 const PrivetURLFetcher::TokenCallback& callback) override {
65 FAIL(); 66 FAIL();
66 } 67 }
67 68
68 scoped_ptr<PrivetJSONOperation> CreateInfoOperation( 69 scoped_ptr<PrivetJSONOperation> CreateInfoOperation(
69 const PrivetJSONOperation::ResultCallback& callback) override { 70 const PrivetJSONOperation::ResultCallback& callback) override {
70 return make_scoped_ptr(CreateInfoOperationPtr(callback)); 71 return make_scoped_ptr(CreateInfoOperationPtr(callback));
71 } 72 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 .WillOnce(Invoke([this](const base::DictionaryValue& data) { 335 .WillOnce(Invoke([this](const base::DictionaryValue& data) {
335 std::string session_id; 336 std::string session_id;
336 EXPECT_TRUE(data.GetString("sessionId", &session_id)); 337 EXPECT_TRUE(data.GetString("sessionId", &session_id));
337 })); 338 }));
338 } 339 }
339 340
340 // TODO(vitalybuka): replace PrivetHTTPClient with regular URL fetcher and 341 // TODO(vitalybuka): replace PrivetHTTPClient with regular URL fetcher and
341 // implement SendMessage test. 342 // implement SendMessage test.
342 343
343 } // namespace extensions 344 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_http.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698