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

Side by Side Diff: net/ssl/channel_id_service.cc

Issue 2894863002: Rename TaskRunner::RunsTasksOnCurrentThread() in //net (Closed)
Patch Set: fixed build error 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ssl/channel_id_service.h" 5 #include "net/ssl/channel_id_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 WorkerDoneCallback; 105 WorkerDoneCallback;
106 106
107 ChannelIDServiceWorker(const std::string& server_identifier, 107 ChannelIDServiceWorker(const std::string& server_identifier,
108 const WorkerDoneCallback& callback) 108 const WorkerDoneCallback& callback)
109 : server_identifier_(server_identifier), 109 : server_identifier_(server_identifier),
110 origin_task_runner_(base::ThreadTaskRunnerHandle::Get()), 110 origin_task_runner_(base::ThreadTaskRunnerHandle::Get()),
111 callback_(callback) {} 111 callback_(callback) {}
112 112
113 // Starts the worker asynchronously. 113 // Starts the worker asynchronously.
114 void Start(const scoped_refptr<base::TaskRunner>& task_runner) { 114 void Start(const scoped_refptr<base::TaskRunner>& task_runner) {
115 DCHECK(origin_task_runner_->RunsTasksOnCurrentThread()); 115 DCHECK(origin_task_runner_->RunsTasksInCurrentSequence());
116 116
117 auto callback = base::Bind(&ChannelIDServiceWorker::Run, base::Owned(this)); 117 auto callback = base::Bind(&ChannelIDServiceWorker::Run, base::Owned(this));
118 118
119 if (task_runner) { 119 if (task_runner) {
120 task_runner->PostTask(FROM_HERE, callback); 120 task_runner->PostTask(FROM_HERE, callback);
121 } else { 121 } else {
122 base::PostTaskWithTraits( 122 base::PostTaskWithTraits(
123 FROM_HERE, 123 FROM_HERE,
124 {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, 124 {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
125 callback); 125 callback);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 return err; 477 return err;
478 } 478 }
479 479
480 int ChannelIDService::channel_id_count() { 480 int ChannelIDService::channel_id_count() {
481 return channel_id_store_->GetChannelIDCount(); 481 return channel_id_store_->GetChannelIDCount();
482 } 482 }
483 483
484 } // namespace net 484 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_android.cc ('k') | net/url_request/test_url_request_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698