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

Side by Side Diff: components/copresence/handlers/directive_handler.cc

Issue 433283002: Adding the Copresence RpcHandler and HttpPost helper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@directive-handler
Patch Set: Rebasing off the correct CL Created 6 years, 4 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 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
3 // found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 #include "components/copresence/handlers/directive_handler.h" 5 #include "components/copresence/handlers/directive_handler.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "components/copresence/handlers/audio/audio_directive_handler.h" 8 #include "components/copresence/handlers/audio/audio_directive_handler.h"
9 #include "components/copresence/proto/data.pb.h" 9 #include "components/copresence/proto/data.pb.h"
10 10
11 namespace copresence { 11 namespace copresence {
12 12
13 DirectiveHandler::DirectiveHandler( 13 DirectiveHandler::DirectiveHandler(
(...skipping 14 matching lines...) Expand all
28 // We currently only support audio. 28 // We currently only support audio.
29 DCHECK_EQ(ti.medium(), AUDIO_ULTRASOUND_PASSBAND); 29 DCHECK_EQ(ti.medium(), AUDIO_ULTRASOUND_PASSBAND);
30 audio_handler_->AddInstruction( 30 audio_handler_->AddInstruction(
31 ti, base::TimeDelta::FromMilliseconds(directive.ttl_millis())); 31 ti, base::TimeDelta::FromMilliseconds(directive.ttl_millis()));
32 } 32 }
33 33
34 void DirectiveHandler::RemoveDirectives(const std::string& /* op_id */) { 34 void DirectiveHandler::RemoveDirectives(const std::string& /* op_id */) {
35 // TODO(rkc): Forward the remove directive call to all the directive handlers. 35 // TODO(rkc): Forward the remove directive call to all the directive handlers.
36 } 36 }
37 37
38 // Protected
39
40 DirectiveHandler::DirectiveHandler() {
Daniel Erat 2014/08/06 00:44:46 this leaves the object in a state where methods wi
Charlie 2014/08/06 19:32:18 Not sure I understand - FakeDirectiveHandler is th
41 }
42
38 } // namespace copresence 43 } // namespace copresence
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698