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

Unified Diff: chrome/browser/extensions/api/tabs/tabs.cc

Issue 10692110: screenshot disabling policy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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/extensions/api/tabs/tabs.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs.cc b/chrome/browser/extensions/api/tabs/tabs.cc
index 3d80a52e7ef640dd813a48194a717a80f717f276..eb620349d0cfa3ccc47c1f6c32df86dbc246abdd 100644
--- a/chrome/browser/extensions/api/tabs/tabs.cc
+++ b/chrome/browser/extensions/api/tabs/tabs.cc
@@ -79,6 +79,11 @@
#include "chrome/browser/ui/views/ash/panel_view_aura.h"
#endif
+#if defined(OS_CHROMEOS)
Mattias Nissler (ping if slow) 2012/07/06 15:15:52 no need for preprocessor guards
qfel 2012/07/06 17:00:39 Done
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/prefs/pref_service.h"
+#endif
+
#if defined(OS_WIN)
#include "base/win/metro.h"
#endif // OS_WIN
@@ -1599,6 +1604,10 @@ bool CaptureVisibleTabFunction::GetTabToCapture(
};
bool CaptureVisibleTabFunction::RunImpl() {
+ PrefService* service = g_browser_process->local_state();
Mattias Nissler (ping if slow) 2012/07/06 15:15:52 Have you thought about registering this as a Profi
qfel 2012/07/06 17:00:39 Done.
+ if (service->GetBoolean(prefs::kDisableScreenshots))
+ EXTENSION_FUNCTION_ERROR("keys::kXXX");
Mattias Nissler (ping if slow) 2012/07/06 15:15:52 add proper constants.
qfel 2012/07/06 17:00:39 Done.
+
WebContents* web_contents = NULL;
TabContents* tab_contents = NULL;
if (!GetTabToCapture(&web_contents, &tab_contents))

Powered by Google App Engine
This is Rietveld 408576698