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

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

Issue 2824363002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/ui (Closed)
Patch Set: Created 3 years, 8 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 double net_error; 219 double net_error;
220 double expire_days_from_now; 220 double expire_days_from_now;
221 ASSERT_TRUE(list_value->GetString(0, &hostname)); 221 ASSERT_TRUE(list_value->GetString(0, &hostname));
222 ASSERT_TRUE(list_value->GetString(1, &ip_literal)); 222 ASSERT_TRUE(list_value->GetString(1, &ip_literal));
223 ASSERT_TRUE(list_value->GetDouble(2, &net_error)); 223 ASSERT_TRUE(list_value->GetDouble(2, &net_error));
224 ASSERT_TRUE(list_value->GetDouble(3, &expire_days_from_now)); 224 ASSERT_TRUE(list_value->GetDouble(3, &expire_days_from_now));
225 ASSERT_TRUE(browser()); 225 ASSERT_TRUE(browser());
226 226
227 BrowserThread::PostTask( 227 BrowserThread::PostTask(
228 BrowserThread::IO, FROM_HERE, 228 BrowserThread::IO, FROM_HERE,
229 base::Bind(&AddCacheEntryOnIOThread, 229 base::BindOnce(
230 base::RetainedRef(browser()->profile()->GetRequestContext()), 230 &AddCacheEntryOnIOThread,
231 hostname, ip_literal, static_cast<int>(net_error), 231 base::RetainedRef(browser()->profile()->GetRequestContext()),
232 static_cast<int>(expire_days_from_now))); 232 hostname, ip_literal, static_cast<int>(net_error),
233 static_cast<int>(expire_days_from_now)));
233 } 234 }
234 235
235 void NetInternalsTest::MessageHandler::ChangeNetwork( 236 void NetInternalsTest::MessageHandler::ChangeNetwork(
236 const base::ListValue* list_value) { 237 const base::ListValue* list_value) {
237 net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests(); 238 net::NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
238 } 239 }
239 240
240 void NetInternalsTest::MessageHandler::LoadPage( 241 void NetInternalsTest::MessageHandler::LoadPage(
241 const base::ListValue* list_value) { 242 const base::ListValue* list_value) {
242 std::string url; 243 std::string url;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (test_server_started_) 377 if (test_server_started_)
377 return true; 378 return true;
378 test_server_started_ = embedded_test_server()->Start(); 379 test_server_started_ = embedded_test_server()->Start();
379 380
380 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1 381 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1
381 // are forbidden. 382 // are forbidden.
382 host_resolver()->AddRule("testdomain.com", "127.0.0.1"); 383 host_resolver()->AddRule("testdomain.com", "127.0.0.1");
383 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1"); 384 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1");
384 return test_server_started_; 385 return test_server_started_;
385 } 386 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698