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

Unified Diff: chrome/browser/profiles/off_the_record_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index dfcef82b4ffaef43da1ab34f0068031e73e33ae9..c8e62230cc1bb21ba7a53e78741fb05423750e2a 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -30,6 +30,8 @@
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
+#include "chrome/browser/wake_lock/chrome_wake_lock_permission_context.h"
+#include "chrome/browser/wake_lock/chrome_wake_lock_permission_context_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -379,6 +381,15 @@ OffTheRecordProfileImpl::GetPushMessagingService() {
return NULL;
}
+content::WakeLockPermissionContext*
+ OffTheRecordProfileImpl::GetWakeLockPermissionContext() {
+#if defined(OS_IOS)
+ return NULL;
+#else
+ return ChromeWakeLockPermissionContextFactory::GetForProfile(this);
+#endif
+}
+
bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) {
return (profile == this) || (profile == profile_);
}

Powered by Google App Engine
This is Rietveld 408576698