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

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

Issue 109043002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 capability)); 335 capability));
336 } 336 }
337 337
338 void NetInternalsTest::MessageHandler::GetNetLogLoggerLog( 338 void NetInternalsTest::MessageHandler::GetNetLogLoggerLog(
339 const ListValue* list_value) { 339 const ListValue* list_value) {
340 base::ScopedTempDir temp_directory; 340 base::ScopedTempDir temp_directory;
341 ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); 341 ASSERT_TRUE(temp_directory.CreateUniqueTempDir());
342 base::FilePath temp_file; 342 base::FilePath temp_file;
343 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_directory.path(), 343 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_directory.path(),
344 &temp_file)); 344 &temp_file));
345 FILE* temp_file_handle = file_util::OpenFile(temp_file, "w"); 345 FILE* temp_file_handle = base::OpenFile(temp_file, "w");
346 ASSERT_TRUE(temp_file_handle); 346 ASSERT_TRUE(temp_file_handle);
347 347
348 scoped_ptr<base::Value> constants(NetInternalsUI::GetConstants()); 348 scoped_ptr<base::Value> constants(NetInternalsUI::GetConstants());
349 scoped_ptr<net::NetLogLogger> net_log_logger(new net::NetLogLogger( 349 scoped_ptr<net::NetLogLogger> net_log_logger(new net::NetLogLogger(
350 temp_file_handle, *constants)); 350 temp_file_handle, *constants));
351 net_log_logger->StartObserving(g_browser_process->net_log()); 351 net_log_logger->StartObserving(g_browser_process->net_log());
352 g_browser_process->net_log()->AddGlobalEntry( 352 g_browser_process->net_log()->AddGlobalEntry(
353 net::NetLog::TYPE_NETWORK_IP_ADDRESSES_CHANGED); 353 net::NetLog::TYPE_NETWORK_IP_ADDRESSES_CHANGED);
354 net::BoundNetLog bound_net_log = net::BoundNetLog::Make( 354 net::BoundNetLog bound_net_log = net::BoundNetLog::Make(
355 g_browser_process->net_log(), 355 g_browser_process->net_log(),
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 GURL url_loader = test_server()->GetURL(replacement_path); 425 GURL url_loader = test_server()->GetURL(replacement_path);
426 return url_loader; 426 return url_loader;
427 } 427 }
428 428
429 bool NetInternalsTest::StartTestServer() { 429 bool NetInternalsTest::StartTestServer() {
430 if (test_server_started_) 430 if (test_server_started_)
431 return true; 431 return true;
432 test_server_started_ = test_server()->Start(); 432 test_server_started_ = test_server()->Start();
433 return test_server_started_; 433 return test_server_started_;
434 } 434 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698