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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc

Issue 896713003: Revert of DataReductionProxyStatisticsPrefs should support WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
(...skipping 28 matching lines...) Expand all
39 // Android and iOS in order for non-zero delays to be supported. 39 // Android and iOS in order for non-zero delays to be supported.
40 // (http://crbug.com/408264) 40 // (http://crbug.com/408264)
41 base::TimeDelta commit_delay = base::TimeDelta(); 41 base::TimeDelta commit_delay = base::TimeDelta();
42 #else 42 #else
43 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); 43 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
44 #endif 44 #endif
45 45
46 data_reduction_proxy::DataReductionProxyStatisticsPrefs* 46 data_reduction_proxy::DataReductionProxyStatisticsPrefs*
47 data_reduction_proxy_statistics_prefs = 47 data_reduction_proxy_statistics_prefs =
48 new data_reduction_proxy::DataReductionProxyStatisticsPrefs( 48 new data_reduction_proxy::DataReductionProxyStatisticsPrefs(
49 prefs, ui_task_runner, commit_delay); 49 prefs, ui_task_runner,
50 commit_delay);
50 51
51 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> 52 scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
52 data_reduction_proxy_io_data( 53 data_reduction_proxy_io_data(
53 new data_reduction_proxy::DataReductionProxyIOData( 54 new data_reduction_proxy::DataReductionProxyIOData(
54 DataReductionProxyChromeSettings::GetClient(), 55 DataReductionProxyChromeSettings::GetClient(),
55 make_scoped_ptr(data_reduction_proxy_statistics_prefs), 56 make_scoped_ptr(data_reduction_proxy_statistics_prefs),
56 settings, 57 settings,
57 net_log, 58 net_log,
58 io_task_runner, 59 io_task_runner,
59 ui_task_runner)); 60 ui_task_runner));
60 data_reduction_proxy_io_data->InitOnUIThread(prefs); 61 data_reduction_proxy_io_data->InitOnUIThread(prefs);
62 settings->SetDataReductionProxyStatisticsPrefs(
63 data_reduction_proxy_statistics_prefs);
61 64
62 return data_reduction_proxy_io_data.Pass(); 65 return data_reduction_proxy_io_data.Pass();
63 } 66 }
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.cc ('k') | chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698