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

Unified Diff: chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.cc

Issue 499733002: Fixed javascript_dialog_manager to compile when extensions are disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.cc
diff --git a/chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.cc b/chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.cc
index 417a2898d0d5c5ca24a6a3f7a3de5ec48c670b12..fd7f9a6ec3e3fa2f14ab574be38bca6c5cb2e749 100644
--- a/chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.cc
+++ b/chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.cc
@@ -58,22 +58,26 @@ const Extension* GetExtensionForWebContents(WebContents* web_contents) {
// dialog closes.
void IncrementLazyKeepaliveCount(const Extension* extension,
WebContents* web_contents) {
+#if defined(ENABLE_EXTENSIONS)
DCHECK(extension);
DCHECK(web_contents);
extensions::ProcessManager* pm = GetExtensionsProcessManager(web_contents);
if (pm)
pm->IncrementLazyKeepaliveCount(extension);
+#endif // defined(ENABLE_EXTENSIONS)
msw 2014/08/22 22:21:50 nit: "// ENABLE_EXTENSIONS" would follow the more
David Yen 2014/08/22 22:28:25 Done. I went ahead and fixed all the other #endif
}
// Allows an |extension| to shut down its lazy background page after a dialog
// closes (if nothing else is keeping it open).
void DecrementLazyKeepaliveCount(const Extension* extension,
WebContents* web_contents) {
+#if defined(ENABLE_EXTENSIONS)
DCHECK(extension);
DCHECK(web_contents);
extensions::ProcessManager* pm = GetExtensionsProcessManager(web_contents);
if (pm)
pm->DecrementLazyKeepaliveCount(extension);
+#endif // defined(ENABLE_EXTENSIONS)
}
class ChromeJavaScriptDialogManager : public JavaScriptDialogManager {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698