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

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

Issue 623133002: replace OVERRIDE and FINAL with override and final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « components/copresence/rpc/http_post.h ('k') | components/crash/app/breakpad_linux.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 "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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public: 44 public:
45 FakeDirectiveHandler() {} 45 FakeDirectiveHandler() {}
46 virtual ~FakeDirectiveHandler() {} 46 virtual ~FakeDirectiveHandler() {}
47 47
48 const std::vector<Directive>& added_directives() const { 48 const std::vector<Directive>& added_directives() const {
49 return added_directives_; 49 return added_directives_;
50 } 50 }
51 51
52 virtual void Initialize( 52 virtual void Initialize(
53 const AudioRecorder::DecodeSamplesCallback& decode_cb, 53 const AudioRecorder::DecodeSamplesCallback& decode_cb,
54 const AudioDirectiveHandler::EncodeTokenCallback& encode_cb) OVERRIDE {} 54 const AudioDirectiveHandler::EncodeTokenCallback& encode_cb) override {}
55 55
56 virtual void AddDirective(const Directive& directive) OVERRIDE { 56 virtual void AddDirective(const Directive& directive) override {
57 added_directives_.push_back(directive); 57 added_directives_.push_back(directive);
58 } 58 }
59 59
60 virtual void RemoveDirectives(const std::string& op_id) OVERRIDE { 60 virtual void RemoveDirectives(const std::string& op_id) override {
61 // TODO(ckehoe): Add a parallel implementation when prod has one. 61 // TODO(ckehoe): Add a parallel implementation when prod has one.
62 } 62 }
63 63
64 private: 64 private:
65 std::vector<Directive> added_directives_; 65 std::vector<Directive> added_directives_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler); 67 DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler);
68 }; 68 };
69 69
70 } // namespace 70 } // namespace
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 NULL, 136 NULL,
137 status_code, 137 status_code,
138 response); 138 response);
139 } 139 }
140 140
141 // CopresenceDelegate implementation 141 // CopresenceDelegate implementation
142 142
143 virtual void HandleMessages( 143 virtual void HandleMessages(
144 const std::string& app_id, 144 const std::string& app_id,
145 const std::string& subscription_id, 145 const std::string& subscription_id,
146 const std::vector<Message>& messages) OVERRIDE { 146 const std::vector<Message>& messages) override {
147 // app_id is unused for now, pending a server fix. 147 // app_id is unused for now, pending a server fix.
148 messages_by_subscription_[subscription_id] = messages; 148 messages_by_subscription_[subscription_id] = messages;
149 } 149 }
150 150
151 virtual net::URLRequestContextGetter* GetRequestContext() const OVERRIDE { 151 virtual net::URLRequestContextGetter* GetRequestContext() const override {
152 return NULL; 152 return NULL;
153 } 153 }
154 154
155 virtual const std::string GetPlatformVersionString() const OVERRIDE { 155 virtual const std::string GetPlatformVersionString() const override {
156 return kChromeVersion; 156 return kChromeVersion;
157 } 157 }
158 158
159 virtual const std::string GetAPIKey() const OVERRIDE { 159 virtual const std::string GetAPIKey() const override {
160 return api_key_; 160 return api_key_;
161 } 161 }
162 162
163 virtual WhispernetClient* GetWhispernetClient() OVERRIDE { 163 virtual WhispernetClient* GetWhispernetClient() override {
164 return NULL; 164 return NULL;
165 } 165 }
166 166
167 protected: 167 protected:
168 // For rpc_handler_.invalid_audio_token_cache_ 168 // For rpc_handler_.invalid_audio_token_cache_
169 base::MessageLoop message_loop_; 169 base::MessageLoop message_loop_;
170 170
171 RpcHandler rpc_handler_; 171 RpcHandler rpc_handler_;
172 CopresenceStatus status_; 172 CopresenceStatus status_;
173 std::string api_key_; 173 std::string api_key_;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 messages_by_subscription_["Subscription 2"][1].payload()); 276 messages_by_subscription_["Subscription 2"][1].payload());
277 277
278 ASSERT_EQ(2U, directive_handler->added_directives().size()); 278 ASSERT_EQ(2U, directive_handler->added_directives().size());
279 EXPECT_EQ("Subscription 1", 279 EXPECT_EQ("Subscription 1",
280 directive_handler->added_directives()[0].subscription_id()); 280 directive_handler->added_directives()[0].subscription_id());
281 EXPECT_EQ("Subscription 2", 281 EXPECT_EQ("Subscription 2",
282 directive_handler->added_directives()[1].subscription_id()); 282 directive_handler->added_directives()[1].subscription_id());
283 } 283 }
284 284
285 } // namespace copresence 285 } // namespace copresence
OLDNEW
« no previous file with comments | « components/copresence/rpc/http_post.h ('k') | components/crash/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698