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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 406483004: Initial implementation of API WakeLock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 #include "chrome/browser/profiles/profile_info_cache.h" 65 #include "chrome/browser/profiles/profile_info_cache.h"
66 #include "chrome/browser/profiles/profile_manager.h" 66 #include "chrome/browser/profiles/profile_manager.h"
67 #include "chrome/browser/profiles/profile_metrics.h" 67 #include "chrome/browser/profiles/profile_metrics.h"
68 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 68 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
69 #include "chrome/browser/services/gcm/gcm_profile_service.h" 69 #include "chrome/browser/services/gcm/gcm_profile_service.h"
70 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 70 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
71 #include "chrome/browser/services/gcm/push_messaging_service_impl.h" 71 #include "chrome/browser/services/gcm/push_messaging_service_impl.h"
72 #include "chrome/browser/sessions/session_service_factory.h" 72 #include "chrome/browser/sessions/session_service_factory.h"
73 #include "chrome/browser/ui/startup/startup_browser_creator.h" 73 #include "chrome/browser/ui/startup/startup_browser_creator.h"
74 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" 74 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
75 #include "chrome/browser/wake_lock/chrome_wake_lock_permission_context.h"
76 #include "chrome/browser/wake_lock/chrome_wake_lock_permission_context_factory.h "
75 #include "chrome/common/chrome_constants.h" 77 #include "chrome/common/chrome_constants.h"
76 #include "chrome/common/chrome_paths_internal.h" 78 #include "chrome/common/chrome_paths_internal.h"
77 #include "chrome/common/chrome_switches.h" 79 #include "chrome/common/chrome_switches.h"
78 #include "chrome/common/chrome_version_info.h" 80 #include "chrome/common/chrome_version_info.h"
79 #include "chrome/common/pref_names.h" 81 #include "chrome/common/pref_names.h"
80 #include "chrome/common/url_constants.h" 82 #include "chrome/common/url_constants.h"
81 #include "components/bookmarks/browser/bookmark_model.h" 83 #include "components/bookmarks/browser/bookmark_model.h"
82 #include "components/dom_distiller/content/dom_distiller_viewer_source.h" 84 #include "components/dom_distiller/content/dom_distiller_viewer_source.h"
83 #include "components/domain_reliability/monitor.h" 85 #include "components/domain_reliability/monitor.h"
84 #include "components/domain_reliability/service.h" 86 #include "components/domain_reliability/service.h"
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 } 1185 }
1184 1186
1185 #endif // defined(OS_CHROMEOS) 1187 #endif // defined(OS_CHROMEOS)
1186 1188
1187 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() { 1189 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() {
1188 if (!pref_proxy_config_tracker_) 1190 if (!pref_proxy_config_tracker_)
1189 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker()); 1191 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker());
1190 return pref_proxy_config_tracker_.get(); 1192 return pref_proxy_config_tracker_.get();
1191 } 1193 }
1192 1194
1195 content::WakeLockPermissionContext*
1196 ProfileImpl::GetWakeLockPermissionContext() {
1197 #if defined(OS_IOS)
1198 return NULL;
1199 #endif
1200 return ChromeWakeLockPermissionContextFactory::GetForProfile(this);
1201 }
1202
1193 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { 1203 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() {
1194 return predictor_; 1204 return predictor_;
1195 } 1205 }
1196 1206
1197 DevToolsNetworkController* ProfileImpl::GetDevToolsNetworkController() { 1207 DevToolsNetworkController* ProfileImpl::GetDevToolsNetworkController() {
1198 return io_data_.GetDevToolsNetworkController(); 1208 return io_data_.GetDevToolsNetworkController();
1199 } 1209 }
1200 1210
1201 void ProfileImpl::ClearNetworkingHistorySince( 1211 void ProfileImpl::ClearNetworkingHistorySince(
1202 base::Time time, 1212 base::Time time,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 ProfileImpl::CreateDomainReliabilityMonitor() { 1329 ProfileImpl::CreateDomainReliabilityMonitor() {
1320 domain_reliability::DomainReliabilityService* service = 1330 domain_reliability::DomainReliabilityService* service =
1321 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1331 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1322 GetForBrowserContext(this); 1332 GetForBrowserContext(this);
1323 if (!service) 1333 if (!service)
1324 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); 1334 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
1325 1335
1326 return service->CreateMonitor( 1336 return service->CreateMonitor(
1327 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1337 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1328 } 1338 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698