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

Side by Side Diff: net/test/spawned_test_server/base_test_server.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/test/spawned_test_server/base_test_server.h" 5 #include "net/test/spawned_test_server/base_test_server.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 DCHECK(certificates_dir_.empty()); 475 DCHECK(certificates_dir_.empty());
476 document_root_ = document_root; 476 document_root_ = document_root;
477 certificates_dir_ = certificates_dir; 477 certificates_dir_ = certificates_dir;
478 DCHECK(!certificates_dir_.empty()); 478 DCHECK(!certificates_dir_.empty());
479 } 479 }
480 480
481 bool BaseTestServer::ParseServerData(const std::string& server_data) { 481 bool BaseTestServer::ParseServerData(const std::string& server_data) {
482 VLOG(1) << "Server data: " << server_data; 482 VLOG(1) << "Server data: " << server_data;
483 base::JSONReader json_reader; 483 base::JSONReader json_reader;
484 std::unique_ptr<base::Value> value(json_reader.ReadToValue(server_data)); 484 std::unique_ptr<base::Value> value(json_reader.ReadToValue(server_data));
485 if (!value.get() || !value->IsType(base::Value::TYPE_DICTIONARY)) { 485 if (!value.get() || !value->IsType(base::Value::Type::DICTIONARY)) {
486 LOG(ERROR) << "Could not parse server data: " 486 LOG(ERROR) << "Could not parse server data: "
487 << json_reader.GetErrorMessage(); 487 << json_reader.GetErrorMessage();
488 return false; 488 return false;
489 } 489 }
490 490
491 server_data_.reset(static_cast<base::DictionaryValue*>(value.release())); 491 server_data_.reset(static_cast<base::DictionaryValue*>(value.release()));
492 int port = 0; 492 int port = 0;
493 if (!server_data_->GetInteger("port", &port)) { 493 if (!server_data_->GetInteger("port", &port)) {
494 LOG(ERROR) << "Could not find port value"; 494 LOG(ERROR) << "Could not find port value";
495 return false; 495 return false;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 678
679 return GenerateAdditionalArguments(arguments); 679 return GenerateAdditionalArguments(arguments);
680 } 680 }
681 681
682 bool BaseTestServer::GenerateAdditionalArguments( 682 bool BaseTestServer::GenerateAdditionalArguments(
683 base::DictionaryValue* arguments) const { 683 base::DictionaryValue* arguments) const {
684 return true; 684 return true;
685 } 685 }
686 686
687 } // namespace net 687 } // namespace net
OLDNEW
« no previous file with comments | « net/http/transport_security_state_unittest.cc ('k') | net/test/spawned_test_server/local_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698