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

Unified Diff: chrome/renderer/extensions/user_script_slave.cc

Issue 6873014: Clear RenderThread of any Chrome specific code, and move a bunch of stuff out of RenderView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/extensions/extension_process_bindings.cc ('k') | chrome/renderer/renderer_main_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/user_script_slave.cc
===================================================================
--- chrome/renderer/extensions/user_script_slave.cc (revision 81801)
+++ chrome/renderer/extensions/user_script_slave.cc (working copy)
@@ -16,8 +16,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/url_constants.h"
+#include "chrome/renderer/chrome_render_process_observer.h"
#include "chrome/renderer/extension_groups.h"
-#include "content/renderer/render_thread.h"
#include "googleurl/src/gurl.h"
#include "grit/renderer_resources.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
@@ -81,7 +81,8 @@
bool UserScriptSlave::UpdateScripts(base::SharedMemoryHandle shared_memory) {
scripts_.clear();
- bool only_inject_incognito = RenderThread::current()->IsIncognitoProcess();
+ bool only_inject_incognito =
+ ChromeRenderProcessObserver::is_incognito_process();
// Create the shared memory object (read only).
shared_memory_.reset(new base::SharedMemory(shared_memory, true));
@@ -177,7 +178,7 @@
void UserScriptSlave::InsertInitExtensionCode(
std::vector<WebScriptSource>* sources, const std::string& extension_id) {
DCHECK(sources);
- bool incognito = RenderThread::current()->IsIncognitoProcess();
+ bool incognito = ChromeRenderProcessObserver::is_incognito_process();
sources->insert(sources->begin(), WebScriptSource(WebString::fromUTF8(
StringPrintf(kInitExtension, extension_id.c_str(),
incognito ? "true" : "false"))));
« no previous file with comments | « chrome/renderer/extensions/extension_process_bindings.cc ('k') | chrome/renderer/renderer_main_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698