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

Side by Side Diff: components/copresence/rpc/rpc_handler_unittest.cc

Issue 1507893005: Remove const qualifier from function return type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « components/copresence/public/copresence_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/copresence/rpc/rpc_handler.h" 5 #include "components/copresence/rpc/rpc_handler.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 void HandleStatusUpdate(CopresenceStatus /* status */) override { 70 void HandleStatusUpdate(CopresenceStatus /* status */) override {
71 NOTREACHED(); 71 NOTREACHED();
72 } 72 }
73 73
74 net::URLRequestContextGetter* GetRequestContext() const override { 74 net::URLRequestContextGetter* GetRequestContext() const override {
75 return nullptr; 75 return nullptr;
76 } 76 }
77 77
78 const std::string GetPlatformVersionString() const override { 78 std::string GetPlatformVersionString() const override {
79 return kChromeVersion; 79 return kChromeVersion;
80 } 80 }
81 81
82 const std::string GetAPIKey(const std::string& app_id) const override { 82 std::string GetAPIKey(const std::string& app_id) const override {
83 return app_id + " API Key"; 83 return app_id + " API Key";
84 } 84 }
85 85
86 WhispernetClient* GetWhispernetClient() override { 86 WhispernetClient* GetWhispernetClient() override {
87 return whispernet_client_.get(); 87 return whispernet_client_.get();
88 } 88 }
89 89
90 // TODO(ckehoe): Add GCM tests. 90 // TODO(ckehoe): Add GCM tests.
91 gcm::GCMDriver* GetGCMDriver() override { 91 gcm::GCMDriver* GetGCMDriver() override {
92 return nullptr; 92 return nullptr;
93 } 93 }
94 94
95 const std::string GetDeviceId(bool authenticated) override { 95 std::string GetDeviceId(bool authenticated) override {
96 return device_id_by_auth_state_[authenticated]; 96 return device_id_by_auth_state_[authenticated];
97 } 97 }
98 98
99 void SaveDeviceId(bool authenticated, const std::string& device_id) override { 99 void SaveDeviceId(bool authenticated, const std::string& device_id) override {
100 device_id_by_auth_state_[authenticated] = device_id; 100 device_id_by_auth_state_[authenticated] = device_id;
101 } 101 }
102 102
103 protected: 103 protected:
104 104
105 // Send test input to RpcHandler 105 // Send test input to RpcHandler
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // Check processing. 338 // Check processing.
339 status_ = FAIL; 339 status_ = FAIL;
340 SendReportResponse(net::HTTP_OK, response.Pass()); 340 SendReportResponse(net::HTTP_OK, response.Pass());
341 EXPECT_EQ(SUCCESS, status_); 341 EXPECT_EQ(SUCCESS, status_);
342 EXPECT_TRUE(TokenIsInvalid("bad token")); 342 EXPECT_TRUE(TokenIsInvalid("bad token"));
343 EXPECT_THAT(directive_handler_.added_directives(), 343 EXPECT_THAT(directive_handler_.added_directives(),
344 ElementsAre("Subscription 1", "Subscription 2")); 344 ElementsAre("Subscription 1", "Subscription 2"));
345 } 345 }
346 346
347 } // namespace copresence 347 } // namespace copresence
OLDNEW
« no previous file with comments | « components/copresence/public/copresence_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698