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

Side by Side Diff: extensions/browser/api/cast_channel/keep_alive_delegate.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 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 <string> 5 #include <string>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "extensions/browser/api/cast_channel/cast_message_util.h" 9 #include "extensions/browser/api/cast_channel/cast_message_util.h"
10 #include "extensions/browser/api/cast_channel/cast_socket.h" 10 #include "extensions/browser/api/cast_channel/cast_socket.h"
11 #include "extensions/browser/api/cast_channel/keep_alive_delegate.h" 11 #include "extensions/browser/api/cast_channel/keep_alive_delegate.h"
12 #include "extensions/browser/api/cast_channel/logger.h" 12 #include "extensions/browser/api/cast_channel/logger.h"
13 #include "extensions/common/api/cast_channel/cast_channel.pb.h" 13 #include "extensions/common/api/cast_channel/cast_channel.pb.h"
14 #include "extensions/common/api/cast_channel/logging.pb.h" 14 #include "extensions/common/api/cast_channel/logging.pb.h"
15 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
16 16
17 namespace extensions { 17 namespace extensions {
18 namespace core_api { 18 namespace api {
19 namespace cast_channel { 19 namespace cast_channel {
20 namespace { 20 namespace {
21 21
22 const char kHeartbeatNamespace[] = "urn:x-cast:com.google.cast.tp.heartbeat"; 22 const char kHeartbeatNamespace[] = "urn:x-cast:com.google.cast.tp.heartbeat";
23 const char kPingSenderId[] = "chrome"; 23 const char kPingSenderId[] = "chrome";
24 const char kPingReceiverId[] = "receiver-0"; 24 const char kPingReceiverId[] = "receiver-0";
25 const char kTypeNodeId[] = "type"; 25 const char kTypeNodeId[] = "type";
26 26
27 // Determines if the JSON-encoded payload is equivalent to 27 // Determines if the JSON-encoded payload is equivalent to
28 // { "type": |chk_type| } 28 // { "type": |chk_type| }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 void KeepAliveDelegate::Stop() { 194 void KeepAliveDelegate::Stop() {
195 if (started_) { 195 if (started_) {
196 started_ = false; 196 started_ = false;
197 ping_timer_->Stop(); 197 ping_timer_->Stop();
198 liveness_timer_->Stop(); 198 liveness_timer_->Stop();
199 } 199 }
200 } 200 }
201 201
202 } // namespace cast_channel 202 } // namespace cast_channel
203 } // namespace core_api 203 } // namespace api
204 } // namespace extensions 204 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698