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

Side by Side Diff: chrome/browser/net/net_export_helper.cc

Issue 2893653002: Rename Ownership Transferring Methods for Prerenderer (Closed)
Patch Set: 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/net_export_helper.h" 5 #include "chrome/browser/net/net_export_helper.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 8 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
9 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 9 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
10 #include "chrome/browser/prerender/prerender_manager.h" 10 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 17 matching lines...) Expand all
28 #include "chrome/browser/net/service_providers_win.h" 28 #include "chrome/browser/net/service_providers_win.h"
29 #endif 29 #endif
30 30
31 namespace chrome_browser_net { 31 namespace chrome_browser_net {
32 32
33 std::unique_ptr<base::DictionaryValue> GetPrerenderInfo(Profile* profile) { 33 std::unique_ptr<base::DictionaryValue> GetPrerenderInfo(Profile* profile) {
34 std::unique_ptr<base::DictionaryValue> value; 34 std::unique_ptr<base::DictionaryValue> value;
35 prerender::PrerenderManager* prerender_manager = 35 prerender::PrerenderManager* prerender_manager =
36 prerender::PrerenderManagerFactory::GetForBrowserContext(profile); 36 prerender::PrerenderManagerFactory::GetForBrowserContext(profile);
37 if (prerender_manager) { 37 if (prerender_manager) {
38 value = prerender_manager->GetAsValue(); 38 value = prerender_manager->CopyAsValue();
39 } else { 39 } else {
40 value.reset(new base::DictionaryValue()); 40 value.reset(new base::DictionaryValue());
41 value->SetBoolean("enabled", false); 41 value->SetBoolean("enabled", false);
42 value->SetBoolean("omnibox_enabled", false); 42 value->SetBoolean("omnibox_enabled", false);
43 } 43 }
44 return value; 44 return value;
45 } 45 }
46 46
47 std::unique_ptr<base::Value> GetHistoricNetworkStats(Profile* profile) { 47 std::unique_ptr<base::Value> GetHistoricNetworkStats(Profile* profile) {
48 DataReductionProxyChromeSettings* data_reduction_proxy_settings = 48 DataReductionProxyChromeSettings* data_reduction_proxy_settings =
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 namespace_list->Append(std::move(namespace_dict)); 139 namespace_list->Append(std::move(namespace_dict));
140 } 140 }
141 service_providers->Set("namespace_providers", std::move(namespace_list)); 141 service_providers->Set("namespace_providers", std::move(namespace_list));
142 142
143 return service_providers; 143 return service_providers;
144 } 144 }
145 #endif 145 #endif
146 146
147 } // namespace chrome_browser_net 147 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | chrome/browser/prerender/prerender_history.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698