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

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

Issue 15662008: Make net and ipc explicitly use the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/test/spawned_test_server/spawner_communicator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/local_test_server.h" 5 #include "net/test/spawned_test_server/local_test_server.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 return true; 192 return true;
193 } 193 }
194 194
195 bool LocalTestServer::AddCommandLineArguments(CommandLine* command_line) const { 195 bool LocalTestServer::AddCommandLineArguments(CommandLine* command_line) const {
196 base::DictionaryValue arguments_dict; 196 base::DictionaryValue arguments_dict;
197 if (!GenerateArguments(&arguments_dict)) 197 if (!GenerateArguments(&arguments_dict))
198 return false; 198 return false;
199 199
200 // Serialize the argument dictionary into CommandLine. 200 // Serialize the argument dictionary into CommandLine.
201 for (DictionaryValue::Iterator it(arguments_dict); !it.IsAtEnd(); 201 for (base::DictionaryValue::Iterator it(arguments_dict); !it.IsAtEnd();
202 it.Advance()) { 202 it.Advance()) {
203 const base::Value& value = it.value(); 203 const base::Value& value = it.value();
204 const std::string& key = it.key(); 204 const std::string& key = it.key();
205 205
206 // Add arguments from a list. 206 // Add arguments from a list.
207 if (value.IsType(Value::TYPE_LIST)) { 207 if (value.IsType(Value::TYPE_LIST)) {
208 const base::ListValue* list = NULL; 208 const base::ListValue* list = NULL;
209 if (!value.GetAsList(&list) || !list || list->empty()) 209 if (!value.GetAsList(&list) || !list || list->empty())
210 return false; 210 return false;
211 for (base::ListValue::const_iterator list_it = list->begin(); 211 for (base::ListValue::const_iterator list_it = list->begin();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 break; 243 break;
244 default: 244 default:
245 NOTREACHED(); 245 NOTREACHED();
246 return false; 246 return false;
247 } 247 }
248 248
249 return true; 249 return true;
250 } 250 }
251 251
252 } // namespace net 252 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | net/test/spawned_test_server/spawner_communicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698