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

Side by Side Diff: net/test/spawned_test_server/remote_test_server.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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 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/remote_test_server.h" 5 #include "net/test/spawned_test_server/remote_test_server.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/base_paths.h" 12 #include "base/base_paths.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/json/json_writer.h" 15 #include "base/json/json_writer.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/memory/ptr_util.h"
18 #include "base/path_service.h" 19 #include "base/path_service.h"
19 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_split.h" 21 #include "base/strings/string_split.h"
21 #include "base/values.h" 22 #include "base/values.h"
22 #include "net/base/host_port_pair.h" 23 #include "net/base/host_port_pair.h"
23 #include "net/base/net_errors.h" 24 #include "net/base/net_errors.h"
24 #include "net/test/spawned_test_server/spawner_communicator.h" 25 #include "net/test/spawned_test_server/spawner_communicator.h"
25 #include "url/gurl.h" 26 #include "url/gurl.h"
26 27
27 namespace net { 28 namespace net {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return true; 121 return true;
121 122
122 tracker.Get().StartingServer(); 123 tracker.Get().StartingServer();
123 124
124 spawner_communicator_.reset(new SpawnerCommunicator(spawner_server_port_)); 125 spawner_communicator_.reset(new SpawnerCommunicator(spawner_server_port_));
125 126
126 base::DictionaryValue arguments_dict; 127 base::DictionaryValue arguments_dict;
127 if (!GenerateArguments(&arguments_dict)) 128 if (!GenerateArguments(&arguments_dict))
128 return false; 129 return false;
129 130
130 arguments_dict.Set("on-remote-server", base::Value::CreateNullValue()); 131 arguments_dict.Set("on-remote-server", base::MakeUnique<base::Value>());
131 132
132 // Append the 'server-type' argument which is used by spawner server to 133 // Append the 'server-type' argument which is used by spawner server to
133 // pass right server type to Python test server. 134 // pass right server type to Python test server.
134 arguments_dict.SetString("server-type", GetServerTypeString(type())); 135 arguments_dict.SetString("server-type", GetServerTypeString(type()));
135 136
136 // Generate JSON-formatted argument string. 137 // Generate JSON-formatted argument string.
137 std::string arguments_string; 138 std::string arguments_string;
138 base::JSONWriter::Write(arguments_dict, &arguments_string); 139 base::JSONWriter::Write(arguments_dict, &arguments_string);
139 if (arguments_string.empty()) 140 if (arguments_string.empty())
140 return false; 141 return false;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 if (fixed_root.empty()) 242 if (fixed_root.empty())
242 fixed_root = base::FilePath(base::FilePath::kCurrentDirectory); 243 fixed_root = base::FilePath(base::FilePath::kCurrentDirectory);
243 SetResourcePath(fixed_root, base::FilePath().AppendASCII("net") 244 SetResourcePath(fixed_root, base::FilePath().AppendASCII("net")
244 .AppendASCII("data") 245 .AppendASCII("data")
245 .AppendASCII("ssl") 246 .AppendASCII("ssl")
246 .AppendASCII("certificates")); 247 .AppendASCII("certificates"));
247 return true; 248 return true;
248 } 249 }
249 250
250 } // namespace net 251 } // namespace net
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698