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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_config_service.cc

Issue 634023004: Remove implicit conversions from scoped_refptr to T* in components/data_reduction_proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « components/data_reduction_proxy/browser/data_reduction_proxy_config_service.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 "components/data_reduction_proxy/browser/data_reduction_proxy_config_se rvice.h" 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_config_se rvice.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 void DataReductionProxyConfigService::RegisterObserver() { 111 void DataReductionProxyConfigService::RegisterObserver() {
112 if (!registered_observer_ && base_service_.get()) { 112 if (!registered_observer_ && base_service_.get()) {
113 base_service_->AddObserver(this); 113 base_service_->AddObserver(this);
114 registered_observer_ = true; 114 registered_observer_ = true;
115 } 115 }
116 } 116 }
117 117
118 DataReductionProxyConfigTracker::DataReductionProxyConfigTracker( 118 DataReductionProxyConfigTracker::DataReductionProxyConfigTracker(
119 base::Callback<void(bool, const net::ProxyConfig&)> update_proxy_config, 119 base::Callback<void(bool, const net::ProxyConfig&)> update_proxy_config,
120 base::TaskRunner* task_runner) 120 const scoped_refptr<base::TaskRunner>& task_runner)
121 : update_proxy_config_(update_proxy_config), 121 : update_proxy_config_(update_proxy_config),
122 task_runner_(task_runner) { 122 task_runner_(task_runner) {
123 } 123 }
124 124
125 DataReductionProxyConfigTracker::~DataReductionProxyConfigTracker() { 125 DataReductionProxyConfigTracker::~DataReductionProxyConfigTracker() {
126 } 126 }
127 127
128 void DataReductionProxyConfigTracker::Enable( 128 void DataReductionProxyConfigTracker::Enable(
129 bool primary_restricted, 129 bool primary_restricted,
130 bool fallback_restricted, 130 bool fallback_restricted,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 void DataReductionProxyConfigTracker::UpdateProxyConfigOnIOThread( 193 void DataReductionProxyConfigTracker::UpdateProxyConfigOnIOThread(
194 bool enabled, 194 bool enabled,
195 const net::ProxyConfig& config) { 195 const net::ProxyConfig& config) {
196 task_runner_->PostTask( 196 task_runner_->PostTask(
197 FROM_HERE, base::Bind(update_proxy_config_, enabled, config)); 197 FROM_HERE, base::Bind(update_proxy_config_, enabled, config));
198 } 198 }
199 199
200 } // namespace data_reduction_proxy 200 } // namespace data_reduction_proxy
OLDNEW
« no previous file with comments | « components/data_reduction_proxy/browser/data_reduction_proxy_config_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698