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

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

Issue 576483003: Make proto enums canonical for ReadState/WriteState/ConnectState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update all path references to generated protobufs. Created 6 years, 3 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 that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/cast_channel/cast_message_util.h" 5 #include "extensions/browser/api/cast_channel/cast_message_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "extensions/browser/api/cast_channel/cast_channel.pb.h"
12 #include "extensions/common/api/cast_channel.h" 11 #include "extensions/common/api/cast_channel.h"
12 #include "extensions/common/api/cast_channel/cast_channel.pb.h"
13 13
14 namespace { 14 namespace {
15 static const char kAuthNamespace[] = 15 static const char kAuthNamespace[] =
16 "urn:x-cast:com.google.cast.tp.deviceauth"; 16 "urn:x-cast:com.google.cast.tp.deviceauth";
17 // Sender and receiver IDs to use for platform messages. 17 // Sender and receiver IDs to use for platform messages.
18 static const char kPlatformSenderId[] = "sender-0"; 18 static const char kPlatformSenderId[] = "sender-0";
19 static const char kPlatformReceiverId[] = "receiver-0"; 19 static const char kPlatformReceiverId[] = "receiver-0";
20 } // namespace 20 } // namespace
21 21
22 namespace extensions { 22 namespace extensions {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 message_proto->set_payload_binary(auth_message_string); 141 message_proto->set_payload_binary(auth_message_string);
142 } 142 }
143 143
144 bool IsAuthMessage(const CastMessage& message) { 144 bool IsAuthMessage(const CastMessage& message) {
145 return message.namespace_() == kAuthNamespace; 145 return message.namespace_() == kAuthNamespace;
146 } 146 }
147 147
148 } // namespace cast_channel 148 } // namespace cast_channel
149 } // namespace core_api 149 } // namespace core_api
150 } // namespace extensions 150 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/cast_framer_unittest.cc ('k') | extensions/browser/api/cast_channel/cast_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698