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

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 578483002: Cleanup: Only build extensions renderer code when extensions are enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « chrome/renderer/chrome_content_renderer_client.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_process_observer.cc
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index b9a4763f46abed9d1a831c6971f5ddfd320b0919..de375a704a770b4a43395ea7ba0a8933798db76c 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -28,7 +28,6 @@
#include "chrome/common/url_constants.h"
#include "chrome/common/variations/variations_util.h"
#include "chrome/renderer/content_settings_observer.h"
-#include "chrome/renderer/extensions/extension_localization_peer.h"
#include "chrome/renderer/security_filter_peer.h"
#include "content/public/child/resource_dispatcher_delegate.h"
#include "content/public/renderer/render_thread.h"
@@ -48,6 +47,10 @@
#include "base/win/iat_patch_function.h"
#endif
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/renderer/extensions/extension_localization_peer.h"
+#endif
+
using blink::WebCache;
using blink::WebRuntimeFeatures;
using blink::WebSecurityPolicy;
@@ -91,8 +94,12 @@ class RendererResourceDelegate : public content::ResourceDispatcherDelegate {
content::RequestPeer* current_peer,
const std::string& mime_type,
const GURL& url) OVERRIDE {
+#if defined(ENABLE_EXTENSIONS)
return ExtensionLocalizationPeer::CreateExtensionLocalizationPeer(
current_peer, RenderThread::Get(), mime_type, url);
+#else
+ return NULL;
+#endif
}
private:
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698