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

Side by Side Diff: chrome/browser/net/dns_probe_browsertest.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <memory> 5 #include <memory>
6 #include <set> 6 #include <set>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 net::URLRequest* request, 179 net::URLRequest* request,
180 net::NetworkDelegate* network_delegate, 180 net::NetworkDelegate* network_delegate,
181 const base::FilePath& file_path, 181 const base::FilePath& file_path,
182 bool should_delay, 182 bool should_delay,
183 const DestructionCallback& destruction_callback) 183 const DestructionCallback& destruction_callback)
184 : URLRequestMockHTTPJob( 184 : URLRequestMockHTTPJob(
185 request, 185 request,
186 network_delegate, 186 network_delegate,
187 file_path, 187 file_path,
188 base::CreateTaskRunnerWithTraits( 188 base::CreateTaskRunnerWithTraits(
189 base::TaskTraits() 189 {base::MayBlock(), base::TaskPriority::BACKGROUND,
190 .MayBlock() 190 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})),
191 .WithPriority(base::TaskPriority::BACKGROUND)
192 .WithShutdownBehavior(
193 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))),
194 should_delay_(should_delay), 191 should_delay_(should_delay),
195 start_delayed_(false), 192 start_delayed_(false),
196 destruction_callback_(destruction_callback) {} 193 destruction_callback_(destruction_callback) {}
197 194
198 void Start() override { 195 void Start() override {
199 if (should_delay_) { 196 if (should_delay_) {
200 DCHECK(!start_delayed_); 197 DCHECK(!start_delayed_);
201 start_delayed_ = true; 198 start_delayed_ = true;
202 return; 199 return;
203 } 200 }
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 982
986 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE, 983 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE,
987 WaitForSentStatus()); 984 WaitForSentStatus());
988 EXPECT_EQ(0, pending_status_count()); 985 EXPECT_EQ(0, pending_status_count());
989 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED"); 986 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED");
990 } 987 }
991 988
992 } // namespace 989 } // namespace
993 990
994 } // namespace chrome_browser_net 991 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/metrics/google_update_metrics_provider_win.cc ('k') | chrome/browser/net/errorpage_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698