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

Side by Side Diff: net/http/http_server_properties_manager.cc

Issue 2562843002: Change SequencedTaskRunner to SingleThreadTaskRunner in HttpServerPropertiesManager (Closed)
Patch Set: Created 4 years 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/http/http_server_properties_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/http/http_server_properties_manager.h" 5 #include "net/http/http_server_properties_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 } // namespace 67 } // namespace
68 68
69 //////////////////////////////////////////////////////////////////////////////// 69 ////////////////////////////////////////////////////////////////////////////////
70 // HttpServerPropertiesManager 70 // HttpServerPropertiesManager
71 71
72 HttpServerPropertiesManager::PrefDelegate::~PrefDelegate() {} 72 HttpServerPropertiesManager::PrefDelegate::~PrefDelegate() {}
73 73
74 HttpServerPropertiesManager::HttpServerPropertiesManager( 74 HttpServerPropertiesManager::HttpServerPropertiesManager(
75 PrefDelegate* pref_delegate, 75 PrefDelegate* pref_delegate,
76 scoped_refptr<base::SequencedTaskRunner> network_task_runner) 76 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner)
77 : pref_task_runner_(base::ThreadTaskRunnerHandle::Get()), 77 : pref_task_runner_(base::ThreadTaskRunnerHandle::Get()),
78 pref_delegate_(pref_delegate), 78 pref_delegate_(pref_delegate),
79 setting_prefs_(false), 79 setting_prefs_(false),
80 network_task_runner_(network_task_runner) { 80 network_task_runner_(network_task_runner) {
81 DCHECK(pref_delegate_); 81 DCHECK(pref_delegate_);
82 pref_weak_ptr_factory_.reset( 82 pref_weak_ptr_factory_.reset(
83 new base::WeakPtrFactory<HttpServerPropertiesManager>(this)); 83 new base::WeakPtrFactory<HttpServerPropertiesManager>(this));
84 pref_weak_ptr_ = pref_weak_ptr_factory_->GetWeakPtr(); 84 pref_weak_ptr_ = pref_weak_ptr_factory_->GetWeakPtr();
85 pref_cache_update_timer_.reset(new base::OneShotTimer); 85 pref_cache_update_timer_.reset(new base::OneShotTimer);
86 pref_delegate_->StartListeningForUpdates( 86 pref_delegate_->StartListeningForUpdates(
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 quic_servers_dict); 1115 quic_servers_dict);
1116 } 1116 }
1117 1117
1118 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() { 1118 void HttpServerPropertiesManager::OnHttpServerPropertiesChanged() {
1119 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread()); 1119 DCHECK(pref_task_runner_->RunsTasksOnCurrentThread());
1120 if (!setting_prefs_) 1120 if (!setting_prefs_)
1121 ScheduleUpdateCacheOnPrefThread(); 1121 ScheduleUpdateCacheOnPrefThread();
1122 } 1122 }
1123 1123
1124 } // namespace net 1124 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698