OLD | NEW |
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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // Closing all a Browser's tabs will ultimately result in its destruction, | 272 // Closing all a Browser's tabs will ultimately result in its destruction, |
273 // thought it may not have been destroyed yet. | 273 // thought it may not have been destroyed yet. |
274 incognito_browser_ = NULL; | 274 incognito_browser_ = NULL; |
275 } | 275 } |
276 | 276 |
277 void NetInternalsTest::MessageHandler::GetNetLogFileContents( | 277 void NetInternalsTest::MessageHandler::GetNetLogFileContents( |
278 const base::ListValue* list_value) { | 278 const base::ListValue* list_value) { |
279 base::ScopedTempDir temp_directory; | 279 base::ScopedTempDir temp_directory; |
280 ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); | 280 ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); |
281 base::FilePath temp_file; | 281 base::FilePath temp_file; |
282 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_directory.path(), | 282 ASSERT_TRUE( |
283 &temp_file)); | 283 base::CreateTemporaryFileInDir(temp_directory.GetPath(), &temp_file)); |
284 base::ScopedFILE temp_file_handle(base::OpenFile(temp_file, "w")); | 284 base::ScopedFILE temp_file_handle(base::OpenFile(temp_file, "w")); |
285 ASSERT_TRUE(temp_file_handle); | 285 ASSERT_TRUE(temp_file_handle); |
286 | 286 |
287 std::unique_ptr<base::Value> constants(net_log::ChromeNetLog::GetConstants( | 287 std::unique_ptr<base::Value> constants(net_log::ChromeNetLog::GetConstants( |
288 base::CommandLine::ForCurrentProcess()->GetCommandLineString(), | 288 base::CommandLine::ForCurrentProcess()->GetCommandLineString(), |
289 chrome::GetChannelString())); | 289 chrome::GetChannelString())); |
290 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_logger( | 290 std::unique_ptr<net::WriteToFileNetLogObserver> net_log_logger( |
291 new net::WriteToFileNetLogObserver()); | 291 new net::WriteToFileNetLogObserver()); |
292 net_log_logger->StartObserving(g_browser_process->net_log(), | 292 net_log_logger->StartObserving(g_browser_process->net_log(), |
293 std::move(temp_file_handle), constants.get(), | 293 std::move(temp_file_handle), constants.get(), |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 if (test_server_started_) | 367 if (test_server_started_) |
368 return true; | 368 return true; |
369 test_server_started_ = embedded_test_server()->Start(); | 369 test_server_started_ = embedded_test_server()->Start(); |
370 | 370 |
371 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1 | 371 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1 |
372 // are forbidden. | 372 // are forbidden. |
373 host_resolver()->AddRule("testdomain.com", "127.0.0.1"); | 373 host_resolver()->AddRule("testdomain.com", "127.0.0.1"); |
374 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1"); | 374 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1"); |
375 return test_server_started_; | 375 return test_server_started_; |
376 } | 376 } |
OLD | NEW |