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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 years, 3 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
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 <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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(),
294 nullptr); 294 nullptr);
295 g_browser_process->net_log()->AddGlobalEntry( 295 g_browser_process->net_log()->AddGlobalEntry(
296 net::NetLogEventType::NETWORK_IP_ADDRESSES_CHANGED); 296 net::NetLogEventType::NETWORK_IP_ADDRESSES_CHANGED);
297 net::BoundNetLog bound_net_log = net::BoundNetLog::Make( 297 net::NetLogWithSource net_log_with_source = net::NetLogWithSource::Make(
298 g_browser_process->net_log(), net::NetLogSourceType::URL_REQUEST); 298 g_browser_process->net_log(), net::NetLogSourceType::URL_REQUEST);
299 bound_net_log.BeginEvent(net::NetLogEventType::REQUEST_ALIVE); 299 net_log_with_source.BeginEvent(net::NetLogEventType::REQUEST_ALIVE);
300 net_log_logger->StopObserving(nullptr); 300 net_log_logger->StopObserving(nullptr);
301 net_log_logger.reset(); 301 net_log_logger.reset();
302 302
303 std::string log_contents; 303 std::string log_contents;
304 ASSERT_TRUE(base::ReadFileToString(temp_file, &log_contents)); 304 ASSERT_TRUE(base::ReadFileToString(temp_file, &log_contents));
305 ASSERT_GT(log_contents.length(), 0u); 305 ASSERT_GT(log_contents.length(), 0u);
306 306
307 std::unique_ptr<base::Value> log_contents_value( 307 std::unique_ptr<base::Value> log_contents_value(
308 new base::StringValue(log_contents)); 308 new base::StringValue(log_contents));
309 RunJavascriptCallback(log_contents_value.get()); 309 RunJavascriptCallback(log_contents_value.get());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698