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

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

Issue 99923002: Move temp file 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
« no previous file with comments | « chrome/browser/ui/pdf/pdf_browsertest.cc ('k') | chrome/installer/setup/install_unittest.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 (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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 hostname, 333 hostname,
334 static_cast<int>(port), 334 static_cast<int>(port),
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(file_util::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 = file_util::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(
(...skipping 70 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/pdf/pdf_browsertest.cc ('k') | chrome/installer/setup/install_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698