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

Side by Side Diff: net/proxy/polling_proxy_config_service.cc

Issue 2854243003: Use constexpr TaskTraits constructor in net. (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
« no previous file with comments | « net/dns/address_sorter_win.cc ('k') | net/socket/tcp_socket_posix.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 "net/proxy/polling_proxy_config_service.h" 5 #include "net/proxy/polling_proxy_config_service.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // request while we are busy, we will defer it until the current poll 84 // request while we are busy, we will defer it until the current poll
85 // completes. 85 // completes.
86 poll_task_queued_ = true; 86 poll_task_queued_ = true;
87 return; 87 return;
88 } 88 }
89 89
90 last_poll_time_ = base::TimeTicks::Now(); 90 last_poll_time_ = base::TimeTicks::Now();
91 poll_task_outstanding_ = true; 91 poll_task_outstanding_ = true;
92 poll_task_queued_ = false; 92 poll_task_queued_ = false;
93 base::PostTaskWithTraits( 93 base::PostTaskWithTraits(
94 FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior( 94 FROM_HERE,
95 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), 95 {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
96 base::Bind(&Core::PollAsync, this, get_config_func_)); 96 base::Bind(&Core::PollAsync, this, get_config_func_));
97 } 97 }
98 98
99 private: 99 private:
100 friend class base::RefCountedThreadSafe<Core>; 100 friend class base::RefCountedThreadSafe<Core>;
101 ~Core() {} 101 ~Core() {}
102 102
103 void PollAsync(GetConfigFunction func) { 103 void PollAsync(GetConfigFunction func) {
104 ProxyConfig config; 104 ProxyConfig config;
105 func(&config); 105 func(&config);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 PollingProxyConfigService::~PollingProxyConfigService() { 185 PollingProxyConfigService::~PollingProxyConfigService() {
186 core_->Orphan(); 186 core_->Orphan();
187 } 187 }
188 188
189 void PollingProxyConfigService::CheckForChangesNow() { 189 void PollingProxyConfigService::CheckForChangesNow() {
190 core_->CheckForChangesNow(); 190 core_->CheckForChangesNow();
191 } 191 }
192 192
193 } // namespace net 193 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/address_sorter_win.cc ('k') | net/socket/tcp_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698