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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc

Issue 903213003: Enable QUIC for proxies based on Finch config and command line switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 5 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/core/browser/data_reduction_proxy_test _utils.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test _utils.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/testing_pref_service.h" 8 #include "base/prefs/testing_pref_service.h"
9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_test_utils.h" 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_test_utils.h"
10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf igurator_test_utils.h" 10 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf igurator_test_utils.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 void DataReductionProxyTestContext::RunUntilIdle() { 94 void DataReductionProxyTestContext::RunUntilIdle() {
95 base::MessageLoop::current()->RunUntilIdle(); 95 base::MessageLoop::current()->RunUntilIdle();
96 } 96 }
97 97
98 void DataReductionProxyTestContext::InitSettings() { 98 void DataReductionProxyTestContext::InitSettings() {
99 DCHECK(test_context_flags_ & 99 DCHECK(test_context_flags_ &
100 DataReductionProxyTestContext::SKIP_SETTINGS_INITIALIZATION); 100 DataReductionProxyTestContext::SKIP_SETTINGS_INITIALIZATION);
101 settings_->InitDataReductionProxySettings( 101 settings_->InitDataReductionProxySettings(
102 &simple_pref_service_, CreateStatisticsPrefs(), request_context_.get(), 102 &simple_pref_service_, CreateStatisticsPrefs(), request_context_.get(),
103 io_data_->net_log(), io_data_->event_store()); 103 io_data_->net_log(), io_data_->event_store(), false);
104 io_data_->SetDataReductionProxyStatisticsPrefs(settings_->statistics_prefs()); 104 io_data_->SetDataReductionProxyStatisticsPrefs(settings_->statistics_prefs());
105 } 105 }
106 106
107 scoped_ptr<DataReductionProxyStatisticsPrefs> 107 scoped_ptr<DataReductionProxyStatisticsPrefs>
108 DataReductionProxyTestContext::CreateStatisticsPrefs() { 108 DataReductionProxyTestContext::CreateStatisticsPrefs() {
109 DCHECK(test_context_flags_ & 109 DCHECK(test_context_flags_ &
110 DataReductionProxyTestContext::SKIP_SETTINGS_INITIALIZATION); 110 DataReductionProxyTestContext::SKIP_SETTINGS_INITIALIZATION);
111 return make_scoped_ptr(new DataReductionProxyStatisticsPrefs( 111 return make_scoped_ptr(new DataReductionProxyStatisticsPrefs(
112 &simple_pref_service_, task_runner_, base::TimeDelta())); 112 &simple_pref_service_, task_runner_, base::TimeDelta()));
113 } 113 }
(...skipping 15 matching lines...) Expand all
129 129
130 DataReductionProxyStatisticsPrefs* 130 DataReductionProxyStatisticsPrefs*
131 DataReductionProxyTestContext::statistics_prefs() 131 DataReductionProxyTestContext::statistics_prefs()
132 const { 132 const {
133 DCHECK(!(test_context_flags_ & 133 DCHECK(!(test_context_flags_ &
134 DataReductionProxyTestContext::SKIP_SETTINGS_INITIALIZATION)); 134 DataReductionProxyTestContext::SKIP_SETTINGS_INITIALIZATION));
135 return statistics_prefs_pointer_; 135 return statistics_prefs_pointer_;
136 } 136 }
137 137
138 } // namespace data_reduction_proxy 138 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698