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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad rebase Created 6 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 base::Value* value) { 173 base::Value* value) {
174 web_ui()->CallJavascriptFunction("NetInternalsTest.callback", *value); 174 web_ui()->CallJavascriptFunction("NetInternalsTest.callback", *value);
175 } 175 }
176 176
177 void NetInternalsTest::MessageHandler::GetTestServerURL( 177 void NetInternalsTest::MessageHandler::GetTestServerURL(
178 const base::ListValue* list_value) { 178 const base::ListValue* list_value) {
179 ASSERT_TRUE(net_internals_test_->StartTestServer()); 179 ASSERT_TRUE(net_internals_test_->StartTestServer());
180 std::string path; 180 std::string path;
181 ASSERT_TRUE(list_value->GetString(0, &path)); 181 ASSERT_TRUE(list_value->GetString(0, &path));
182 GURL url = net_internals_test_->test_server()->GetURL(path); 182 GURL url = net_internals_test_->test_server()->GetURL(path);
183 scoped_ptr<base::Value> url_value(base::Value::CreateStringValue(url.spec())); 183 scoped_ptr<base::Value> url_value(new base::StringValue(url.spec()));
184 RunJavascriptCallback(url_value.get()); 184 RunJavascriptCallback(url_value.get());
185 } 185 }
186 186
187 void NetInternalsTest::MessageHandler::AddCacheEntry( 187 void NetInternalsTest::MessageHandler::AddCacheEntry(
188 const base::ListValue* list_value) { 188 const base::ListValue* list_value) {
189 std::string hostname; 189 std::string hostname;
190 std::string ip_literal; 190 std::string ip_literal;
191 double net_error; 191 double net_error;
192 double expire_days_from_now; 192 double expire_days_from_now;
193 ASSERT_TRUE(list_value->GetString(0, &hostname)); 193 ASSERT_TRUE(list_value->GetString(0, &hostname));
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 GURL url_loader = test_server()->GetURL(replacement_path); 345 GURL url_loader = test_server()->GetURL(replacement_path);
346 return url_loader; 346 return url_loader;
347 } 347 }
348 348
349 bool NetInternalsTest::StartTestServer() { 349 bool NetInternalsTest::StartTestServer() {
350 if (test_server_started_) 350 if (test_server_started_)
351 return true; 351 return true;
352 test_server_started_ = test_server()->Start(); 352 test_server_started_ = test_server()->Start();
353 return test_server_started_; 353 return test_server_started_;
354 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698