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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 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
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_channel_api.h" 5 #include "extensions/browser/api/cast_channel/cast_channel_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 if (params_->message.source_id.empty()) { 373 if (params_->message.source_id.empty()) {
374 SetError("message_info.source_id is required"); 374 SetError("message_info.source_id is required");
375 return false; 375 return false;
376 } 376 }
377 if (params_->message.destination_id.empty()) { 377 if (params_->message.destination_id.empty()) {
378 SetError("message_info.destination_id is required"); 378 SetError("message_info.destination_id is required");
379 return false; 379 return false;
380 } 380 }
381 switch (params_->message.data->GetType()) { 381 switch (params_->message.data->GetType()) {
382 case base::Value::TYPE_STRING: 382 case base::Value::Type::STRING:
383 case base::Value::TYPE_BINARY: 383 case base::Value::Type::BINARY:
384 break; 384 break;
385 default: 385 default:
386 SetError("Invalid type of message_info.data"); 386 SetError("Invalid type of message_info.data");
387 return false; 387 return false;
388 } 388 }
389 return true; 389 return true;
390 } 390 }
391 391
392 void CastChannelSendFunction::AsyncWorkStart() { 392 void CastChannelSendFunction::AsyncWorkStart() {
393 CastSocket* socket = GetSocket(params_->channel.channel_id); 393 CastSocket* socket = GetSocket(params_->channel.channel_id);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return true; 557 return true;
558 } 558 }
559 559
560 void CastChannelSetAuthorityKeysFunction::AsyncWorkStart() { 560 void CastChannelSetAuthorityKeysFunction::AsyncWorkStart() {
561 // TODO(eroman): crbug.com/601171: Delete this once the API is 561 // TODO(eroman): crbug.com/601171: Delete this once the API is
562 // removed. It is currently a no-op. 562 // removed. It is currently a no-op.
563 AsyncWorkCompleted(); 563 AsyncWorkCompleted();
564 } 564 }
565 565
566 } // namespace extensions 566 } // namespace extensions
OLDNEW
« no previous file with comments | « device/geolocation/network_location_request.cc ('k') | extensions/browser/api/cast_channel/cast_message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698