summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/chrome_main.cc4
-rw-r--r--chrome/chrome_common.gypi2
-rw-r--r--chrome/chrome_dll.gypi1
-rw-r--r--chrome/chrome_renderer.gypi7
-rw-r--r--chrome/common/chrome_switches.cc20
-rw-r--r--chrome/common/chrome_switches.h6
-rw-r--r--chrome/renderer/DEPS1
-rw-r--r--chrome/renderer/chrome_render_process_observer.cc6
-rw-r--r--chrome/renderer/chrome_renderer_glue.cc58
-rw-r--r--chrome/renderer/safe_browsing/render_view_fake_resources_test.cc2
-rw-r--r--chrome/test/render_view_test.cc2
-rw-r--r--chrome/test/render_view_test.h2
-rw-r--r--content/common/content_counters.cc (renamed from chrome/common/chrome_counters.cc)18
-rw-r--r--content/common/content_counters.h (renamed from chrome/common/chrome_counters.h)18
-rw-r--r--content/common/content_switches.cc21
-rw-r--r--content/common/content_switches.h6
-rw-r--r--content/content_common.gypi2
-rw-r--r--content/content_renderer.gypi7
-rw-r--r--content/renderer/DEPS1
-rw-r--r--content/renderer/renderer_glue.cc (renamed from chrome/renderer/renderer_glue.cc)47
-rw-r--r--content/renderer/renderer_main.cc (renamed from chrome/renderer/renderer_main.cc)16
-rw-r--r--content/renderer/renderer_main_platform_delegate.h (renamed from chrome/renderer/renderer_main_platform_delegate.h)0
-rw-r--r--content/renderer/renderer_main_platform_delegate_linux.cc (renamed from chrome/renderer/renderer_main_platform_delegate_linux.cc)5
-rw-r--r--content/renderer/renderer_main_platform_delegate_mac.mm (renamed from chrome/renderer/renderer_main_platform_delegate_mac.mm)4
-rw-r--r--content/renderer/renderer_main_platform_delegate_win.cc (renamed from chrome/renderer/renderer_main_platform_delegate_win.cc)5
25 files changed, 128 insertions, 133 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index bf2e210..eb4f631 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -26,7 +26,6 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_content_plugin_client.h"
-#include "chrome/common/chrome_counters.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
@@ -37,6 +36,7 @@
#include "chrome/renderer/chrome_content_renderer_client.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/common/content_client.h"
+#include "content/common/content_counters.h"
#include "content/common/content_paths.h"
#include "content/common/main_function_params.h"
#include "content/common/sandbox_init_wrapper.h"
@@ -685,7 +685,7 @@ int ChromeMain(int argc, char** argv) {
InitializeStatsTable(browser_pid, command_line);
base::StatsScope<base::StatsCounterTimer>
- startup_timer(chrome::Counters::chrome_main());
+ startup_timer(content::Counters::chrome_main());
// Enable the heap profiler as early as possible!
EnableHeapProfiler(command_line);
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index a740008..e072567 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -35,8 +35,6 @@
'common/child_process_logging_linux.cc',
'common/child_process_logging_mac.mm',
'common/child_process_logging_win.cc',
- 'common/chrome_counters.cc',
- 'common/chrome_counters.h',
'common/chrome_version_info.cc',
'common/chrome_version_info.h',
'common/content_restriction.h',
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index c701750..46fd3ca 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -601,6 +601,7 @@
'../content/common/child_process.cc',
'../content/common/child_thread.cc',
'../content/common/content_client.cc',
+ '../content/common/content_counters.cc',
'../content/common/content_message_generator.cc',
'../content/common/content_paths.cc',
'../content/common/content_switches.cc',
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index dd3929e..3d1e758 100644
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -99,6 +99,7 @@
'renderer/chrome_render_process_observer.h',
'renderer/chrome_render_view_observer.cc',
'renderer/chrome_render_view_observer.h',
+ 'renderer/chrome_renderer_glue.cc',
'renderer/content_settings_observer.cc',
'renderer/content_settings_observer.h',
'renderer/devtools_agent.cc',
@@ -124,14 +125,8 @@
'renderer/print_web_view_helper_linux.cc',
'renderer/print_web_view_helper_mac.mm',
'renderer/print_web_view_helper_win.cc',
- 'renderer/renderer_glue.cc',
'renderer/renderer_histogram_snapshots.cc',
'renderer/renderer_histogram_snapshots.h',
- 'renderer/renderer_main.cc',
- 'renderer/renderer_main_platform_delegate.h',
- 'renderer/renderer_main_platform_delegate_linux.cc',
- 'renderer/renderer_main_platform_delegate_mac.mm',
- 'renderer/renderer_main_platform_delegate_win.cc',
# TODO(noelutz): Find a better way to include these files
'<(protoc_out_dir)/chrome/renderer/safe_browsing/client_model.pb.cc',
'<(protoc_out_dir)/chrome/renderer/safe_browsing/client_model.pb.h',
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index dd92eb7..8b5a99e 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -553,18 +553,6 @@ const char kForceAppsPromoVisible[] = "force-apps-promo-visible";
// the base layer even when compositing is not strictly required.
const char kForceCompositingMode[] = "force-compositing-mode";
-// Some field tests may rendomized in the browser, and the randomly selected
-// outcome needs to be propagated to the renderer. For instance, this is used
-// to modify histograms recorded in the renderer, or to get the renderer to
-// also set of its state (initialize, or not initialize components) to match the
-// experiment(s).
-// The argument is a string-ized list of experiment names, and the associated
-// value that was randomly selected. In the recent implementetaion, the
-// persistent representation generated by field_trial.cc and later decoded, is a
-// list of name and value pairs, separated by slashes. See field trial.cc for
-// current details.
-const char kForceFieldTestNameAndValue[] = "force-fieldtest";
-
// Force renderer accessibility to be on instead of enabling it on demand when
// a screen reader is detected. The disable-renderer-accessibility switch
// overrides this if present.
@@ -823,14 +811,6 @@ const char kRemoteDebuggingPort[] = "remote-debugging-port";
// Enable remote debug / automation shell on the specified port.
const char kRemoteShellPort[] = "remote-shell-port";
-// Causes the renderer process to throw an assertion on launch.
-const char kRendererAssertTest[] = "renderer-assert-test";
-
-#if !defined(OFFICIAL_BUILD)
-// Causes the renderer process to throw an assertion on launch.
-const char kRendererCheckFalseTest[] = "renderer-check-false-test";
-#endif
-
// Indicates the last session should be restored on startup. This overrides
// the preferences value and is primarily intended for testing. The value of
// this switch is the number of tabs to wait until loaded before
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 8eae4b0..82069b5 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -163,7 +163,6 @@ extern const char kFocusExistingTabOnOpen[];
extern const char kFirstRun[];
extern const char kForceAppsPromoVisible[];
extern const char kForceCompositingMode[];
-extern const char kForceFieldTestNameAndValue[];
extern const char kForceRendererAccessibility[];
extern const char kForceStubLibcros[];
extern const char kGSSAPILibraryName[];
@@ -230,7 +229,6 @@ extern const char kPurgeMemoryButton[];
extern const char kReloadKilledTabs[];
extern const char kRemoteDebuggingPort[];
extern const char kRemoteShellPort[];
-extern const char kRendererAssertTest[];
extern const char kRestoreLastSession[];
extern const char kSbInfoURLPrefix[];
extern const char kSbMacKeyURLPrefix[];
@@ -341,10 +339,6 @@ extern const char kWebSocketLiveExperimentHost[];
extern const char kExposePrivateExtensionApi[];
#endif
-#if !defined(OFFICIAL_BUILD)
-extern const char kRendererCheckFalseTest[];
-#endif
-
#if defined(HAVE_XINPUT2)
extern const char kTouchDevices[];
#endif
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS
index f1fd26d..69d084f 100644
--- a/chrome/renderer/DEPS
+++ b/chrome/renderer/DEPS
@@ -18,7 +18,6 @@ include_rules = [
"+webkit/plugins",
"+v8/include",
"+third_party/cld/encodings/compact_lang_det/win",
- "+third_party/mach_override",
"+third_party/npapi/bindings",
"+third_party/sqlite",
]
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index 4d7672b..4ebb6c4 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -11,6 +11,7 @@
#include "base/process_util.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/net/net_resource_provider.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/content_settings_observer.h"
#include "content/common/view_messages.h"
@@ -18,6 +19,7 @@
#include "content/renderer/render_view.h"
#include "content/renderer/render_view_visitor.h"
#include "crypto/nss_util.h"
+#include "net/base/net_module.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
@@ -26,7 +28,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "v8/include/v8.h"
-
#if defined(OS_WIN)
#include "app/win/iat_patch_function.h"
#endif
@@ -113,6 +114,9 @@ ChromeRenderProcessObserver::ChromeRenderProcessObserver() {
base::StatisticsRecorder::set_dump_on_exit(true);
}
+ // Configure modules that need access to resources.
+ net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
+
#if defined(OS_WIN)
// Need to patch a few functions for font loading to work correctly.
FilePath pdf;
diff --git a/chrome/renderer/chrome_renderer_glue.cc b/chrome/renderer/chrome_renderer_glue.cc
new file mode 100644
index 0000000..eabe492
--- /dev/null
+++ b/chrome/renderer/chrome_renderer_glue.cc
@@ -0,0 +1,58 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file provides the Chrome-specific embedder's side of random webkit glue
+// functions.
+
+#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/render_messages.h"
+#include "content/renderer/render_thread.h"
+#include "webkit/glue/webkit_glue.h"
+
+#if !defined(DISABLE_NACL)
+#include "native_client/src/shared/imc/nacl_imc.h"
+#include "native_client/src/trusted/plugin/nacl_entry_points.h"
+#endif
+
+namespace webkit_glue {
+
+void UserMetricsRecordAction(const std::string& action) {
+ RenderThread::current()->Send(
+ new ViewHostMsg_UserMetricsRecordAction(action));
+}
+
+std::string GetProductVersion() {
+ chrome::VersionInfo version_info;
+ std::string product("Chrome/");
+ product += version_info.is_valid() ? version_info.Version()
+ : "0.0.0.0";
+ return product;
+}
+
+#if !defined(DISABLE_NACL)
+bool LaunchSelLdr(const char* alleged_url, int socket_count, void* imc_handles,
+ void* nacl_process_handle, int* nacl_process_id) {
+ std::vector<nacl::FileDescriptor> sockets;
+ base::ProcessHandle nacl_process;
+ if (!RenderThread::current()->Send(
+ new ViewHostMsg_LaunchNaCl(
+ ASCIIToWide(alleged_url),
+ socket_count,
+ &sockets,
+ &nacl_process,
+ reinterpret_cast<base::ProcessId*>(nacl_process_id)))) {
+ return false;
+ }
+ CHECK(static_cast<int>(sockets.size()) == socket_count);
+ for (int i = 0; i < socket_count; i++) {
+ static_cast<nacl::Handle*>(imc_handles)[i] =
+ nacl::ToNativeHandle(sockets[i]);
+ }
+ *static_cast<nacl::Handle*>(nacl_process_handle) = nacl_process;
+ return true;
+}
+#endif
+
+} // namespace webkit_glue
diff --git a/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc b/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc
index 8e1333c..2fabe50 100644
--- a/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc
+++ b/chrome/renderer/safe_browsing/render_view_fake_resources_test.cc
@@ -11,7 +11,6 @@
#include "base/shared_memory.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/mock_render_process.h"
-#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "content/common/dom_storage_common.h"
#include "content/common/main_function_params.h"
#include "content/common/resource_messages.h"
@@ -20,6 +19,7 @@
#include "content/common/view_messages.h"
#include "content/renderer/render_thread.h"
#include "content/renderer/render_view.h"
+#include "content/renderer/renderer_main_platform_delegate.h"
#include "googleurl/src/gurl.h"
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc
index 41a6daf..ebd16fd 100644
--- a/chrome/test/render_view_test.cc
+++ b/chrome/test/render_view_test.cc
@@ -15,11 +15,11 @@
#include "chrome/renderer/extensions/js_only_v8_extensions.h"
#include "chrome/renderer/extensions/renderer_extension_bindings.h"
#include "chrome/renderer/mock_render_process.h"
-#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "content/common/dom_storage_common.h"
#include "content/common/native_web_keyboard_event.h"
#include "content/common/renderer_preferences.h"
#include "content/common/view_messages.h"
+#include "content/renderer/renderer_main_platform_delegate.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
diff --git a/chrome/test/render_view_test.h b/chrome/test/render_view_test.h
index 6b3e971..5d3ec67 100644
--- a/chrome/test/render_view_test.h
+++ b/chrome/test/render_view_test.h
@@ -14,7 +14,6 @@
#include "chrome/renderer/autofill/autofill_agent.h"
#include "chrome/renderer/mock_keyboard.h"
#include "chrome/renderer/mock_render_thread.h"
-#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "content/common/main_function_params.h"
#include "content/common/native_web_keyboard_event.h"
#include "content/common/sandbox_init_wrapper.h"
@@ -31,6 +30,7 @@ class PasswordAutofillManager;
class ExtensionDispatcher;
class MockRenderProcess;
+class RendererMainPlatformDelegate;
class RenderViewTest : public testing::Test {
public:
diff --git a/chrome/common/chrome_counters.cc b/content/common/content_counters.cc
index da6ee3b..1718568 100644
--- a/chrome/common/chrome_counters.cc
+++ b/content/common/content_counters.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/chrome_counters.h"
+#include "content/common/content_counters.h"
#include "base/metrics/stats_counters.h"
-namespace chrome {
+namespace content {
using base::StatsCounterTimer;
using base::StatsRate;
@@ -32,14 +32,4 @@ StatsCounterTimer& Counters::renderer_main() {
return *ctr;
}
-StatsCounterTimer& Counters::spellcheck_init() {
- static StatsCounterTimer* ctr = new StatsCounterTimer("SpellCheck.Init");
- return *ctr;
-}
-
-StatsRate& Counters::spellcheck_lookup() {
- static StatsRate* ctr = new StatsRate("SpellCheck.Lookup");
- return *ctr;
-}
-
-} // namespace chrome
+} // namespace content
diff --git a/chrome/common/chrome_counters.h b/content/common/content_counters.h
index 742cbb4..16dc638 100644
--- a/chrome/common/chrome_counters.h
+++ b/content/common/content_counters.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Counters used within the browser.
-#ifndef CHROME_COMMON_CHROME_COUNTERS_H_
-#define CHROME_COMMON_CHROME_COUNTERS_H_
+#ifndef CONTENT_COMMON_CONTENT_COUNTERS_H_
+#define CONTENT_COMMON_CONTENT_COUNTERS_H_
#pragma once
namespace base {
@@ -14,7 +14,7 @@ class StatsCounterTimer;
class StatsRate;
}
-namespace chrome {
+namespace content {
class Counters {
public:
@@ -23,14 +23,8 @@ class Counters {
// The amount of time spent in renderer initialization.
static base::StatsCounterTimer& renderer_main();
-
- // Time spent in spellchecker initialization.
- static base::StatsCounterTimer& spellcheck_init();
-
- // Time/Count of spellcheck lookups.
- static base::StatsRate& spellcheck_lookup();
};
-} // namespace chrome
+} // namespace content
-#endif // CHROME_COMMON_CHROME_COUNTERS_H_
+#endif // CONTENT_COMMON_CONTENT_COUNTERS_H_
diff --git a/content/common/content_switches.cc b/content/common/content_switches.cc
index 9e64cb7..b6e64e6 100644
--- a/content/common/content_switches.cc
+++ b/content/common/content_switches.cc
@@ -182,6 +182,18 @@ const char kExtraPluginDir[] = "extra-plugin-dir";
// Causes the process to run as an extension subprocess.
const char kExtensionProcess[] = "extension";
+// Some field tests may rendomized in the browser, and the randomly selected
+// outcome needs to be propagated to the renderer. For instance, this is used
+// to modify histograms recorded in the renderer, or to get the renderer to
+// also set of its state (initialize, or not initialize components) to match the
+// experiment(s).
+// The argument is a string-ized list of experiment names, and the associated
+// value that was randomly selected. In the recent implementetaion, the
+// persistent representation generated by field_trial.cc and later decoded, is a
+// list of name and value pairs, separated by slashes. See field trial.cc for
+// current details.
+const char kForceFieldTestNameAndValue[] = "force-fieldtest";
+
// Extra command line options for launching the GPU process (normally used
// for debugging). Use like renderer-cmd-prefix.
const char kGpuLauncher[] = "gpu-launcher";
@@ -302,6 +314,9 @@ const char kProfileImportProcess[] = "profile-import";
// Register Pepper plugins (see pepper_plugin_registry.cc for its format).
const char kRegisterPepperPlugins[] = "register-pepper-plugins";
+// Causes the renderer process to throw an assertion on launch.
+const char kRendererAssertTest[] = "renderer-assert-test";
+
// On POSIX only: the contents of this flag are prepended to the renderer
// command line. Useful values might be "valgrind" or "xterm -e gdb --args".
const char kRendererCmdPrefix[] = "renderer-cmd-prefix";
@@ -380,4 +395,10 @@ const char kZygoteCmdPrefix[] = "zygote-cmd-prefix";
// Causes the process to run as a renderer zygote.
const char kZygoteProcess[] = "zygote";
+
+#if !defined(OFFICIAL_BUILD)
+// Causes the renderer process to throw an assertion on launch.
+const char kRendererCheckFalseTest[] = "renderer-check-false-test";
+#endif
+
} // namespace switches
diff --git a/content/common/content_switches.h b/content/common/content_switches.h
index 761b35b..f5b756c 100644
--- a/content/common/content_switches.h
+++ b/content/common/content_switches.h
@@ -62,6 +62,7 @@ extern const char kExperimentalLocationFeatures[];
// TODO(jam): this doesn't belong in content.
extern const char kExtensionProcess[];
extern const char kExtraPluginDir[];
+extern const char kForceFieldTestNameAndValue[];
extern const char kGpuLauncher[];
extern const char kGpuProcess[];
extern const char kGpuStartupDialog[];
@@ -97,6 +98,7 @@ extern const char kProcessType[];
extern const char kProfileImportProcess[];
extern const char kRecordMode[];
extern const char kRegisterPepperPlugins[];
+extern const char kRendererAssertTest[];
extern const char kRendererCmdPrefix[];
extern const char kRendererCrashTest[];
extern const char kRendererProcess[];
@@ -121,6 +123,10 @@ extern const char kWorkerProcess[];
extern const char kZygoteCmdPrefix[];
extern const char kZygoteProcess[];
+#if !defined(OFFICIAL_BUILD)
+extern const char kRendererCheckFalseTest[];
+#endif
+
} // namespace switches
#endif // CONTENT_COMMON_CONTENT_SWITCHES_H_
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 6a427c6..743b74a 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -54,6 +54,8 @@
'common/content_client.h',
'common/content_constants.cc',
'common/content_constants.h',
+ 'common/content_counters.cc',
+ 'common/content_counters.h',
'common/content_paths.cc',
'common/content_paths.h',
'common/content_switches.cc',
diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi
index 4eff5e7..dcc304e 100644
--- a/content/content_renderer.gypi
+++ b/content/content_renderer.gypi
@@ -15,6 +15,7 @@
'../skia/skia.gyp:skia',
'../third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
'../third_party/icu/icu.gyp:icuuc',
+ '../third_party/icu/icu.gyp:icui18n',
'../third_party/libjingle/libjingle.gyp:libjingle',
'../third_party/libjingle/libjingle.gyp:libjingle_p2p',
'../third_party/npapi/npapi.gyp:npapi',
@@ -105,6 +106,12 @@
'renderer/render_widget_fullscreen_pepper.h',
'renderer/renderer_gl_context.cc',
'renderer/renderer_gl_context.h',
+ 'renderer/renderer_glue.cc',
+ 'renderer/renderer_main.cc',
+ 'renderer/renderer_main_platform_delegate.h',
+ 'renderer/renderer_main_platform_delegate_linux.cc',
+ 'renderer/renderer_main_platform_delegate_mac.mm',
+ 'renderer/renderer_main_platform_delegate_win.cc',
'renderer/renderer_sandbox_support_linux.cc',
'renderer/renderer_sandbox_support_linux.h',
'renderer/renderer_webapplicationcachehost_impl.cc',
diff --git a/content/renderer/DEPS b/content/renderer/DEPS
index 378d848..730495c 100644
--- a/content/renderer/DEPS
+++ b/content/renderer/DEPS
@@ -7,6 +7,7 @@ include_rules = [
"-chrome/renderer/spellchecker",
"+content/plugin", # For shared npruntime proxying code.
+ "+third_party/mach_override",
"+third_party/tcmalloc",
"+v8/include",
]
diff --git a/chrome/renderer/renderer_glue.cc b/content/renderer/renderer_glue.cc
index de13453..58ec602 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/content/renderer/renderer_glue.cc
@@ -15,12 +15,9 @@
#include "base/command_line.h"
#include "base/memory/ref_counted.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_version_info.h"
-#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
#include "content/common/clipboard_messages.h"
+#include "content/common/content_switches.h"
#include "content/common/socket_stream_dispatcher.h"
#include "content/common/view_messages.h"
#include "content/plugin/npobject_util.h"
@@ -36,11 +33,6 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/websocketstreamhandle_bridge.h"
-#if !defined(DISABLE_NACL)
-#include "native_client/src/shared/imc/nacl_imc.h"
-#include "native_client/src/trusted/plugin/nacl_entry_points.h"
-#endif
-
#if defined(OS_LINUX)
#include "content/renderer/renderer_sandbox_support_linux.h"
#endif
@@ -250,14 +242,6 @@ void ClearPredictorCache() {
RenderThread::current()->ClearPredictorCache();
}
-std::string GetProductVersion() {
- chrome::VersionInfo version_info;
- std::string product("Chrome/");
- product += version_info.is_valid() ? version_info.Version()
- : "0.0.0.0";
- return product;
-}
-
bool IsSingleProcess() {
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
}
@@ -266,35 +250,6 @@ void EnableSpdy(bool enable) {
RenderThread::current()->EnableSpdy(enable);
}
-void UserMetricsRecordAction(const std::string& action) {
- RenderThread::current()->Send(
- new ViewHostMsg_UserMetricsRecordAction(action));
-}
-
-#if !defined(DISABLE_NACL)
-bool LaunchSelLdr(const char* alleged_url, int socket_count, void* imc_handles,
- void* nacl_process_handle, int* nacl_process_id) {
- std::vector<nacl::FileDescriptor> sockets;
- base::ProcessHandle nacl_process;
- if (!RenderThread::current()->Send(
- new ViewHostMsg_LaunchNaCl(
- ASCIIToWide(alleged_url),
- socket_count,
- &sockets,
- &nacl_process,
- reinterpret_cast<base::ProcessId*>(nacl_process_id)))) {
- return false;
- }
- CHECK(static_cast<int>(sockets.size()) == socket_count);
- for (int i = 0; i < socket_count; i++) {
- static_cast<nacl::Handle*>(imc_handles)[i] =
- nacl::ToNativeHandle(sockets[i]);
- }
- *static_cast<nacl::Handle*>(nacl_process_handle) = nacl_process;
- return true;
-}
-#endif
-
#if defined(OS_LINUX)
int MatchFontWithFallback(const std::string& face, bool bold,
bool italic, int charset) {
diff --git a/chrome/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 609abfd..f6dc81b 100644
--- a/chrome/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -21,19 +21,14 @@
#include "base/string_util.h"
#include "base/threading/platform_thread.h"
#include "base/time.h"
-#include "chrome/common/chrome_constants.h"
-#include "chrome/common/chrome_counters.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/logging_chrome.h"
-#include "chrome/common/net/net_resource_provider.h"
-#include "chrome/renderer/renderer_main_platform_delegate.h"
+#include "content/common/content_counters.h"
+#include "content/common/content_switches.h"
#include "content/common/main_function_params.h"
#include "content/common/hi_res_timer_manager.h"
#include "content/common/pepper_plugin_registry.h"
#include "content/renderer/render_process_impl.h"
#include "content/renderer/render_thread.h"
-#include "grit/generated_resources.h"
-#include "net/base/net_module.h"
+#include "content/renderer/renderer_main_platform_delegate.h"
#include "ui/base/system_monitor/system_monitor.h"
#include "ui/base/ui_base_switches.h"
@@ -279,9 +274,6 @@ int RendererMain(const MainFunctionParams& parameters) {
}
#endif
- // Configure modules that need access to resources.
- net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
-
// This function allows pausing execution using the --renderer-startup-dialog
// flag allowing us to attach a debugger.
// Do not move this function down since that would mean we can't easily debug
@@ -291,7 +283,7 @@ int RendererMain(const MainFunctionParams& parameters) {
RendererMainPlatformDelegate platform(parameters);
base::StatsScope<base::StatsCounterTimer>
- startup_timer(chrome::Counters::renderer_main());
+ startup_timer(content::Counters::renderer_main());
RendererMessageLoopObserver task_observer;
#if defined(OS_MACOSX)
diff --git a/chrome/renderer/renderer_main_platform_delegate.h b/content/renderer/renderer_main_platform_delegate.h
index c57e90e..c57e90e 100644
--- a/chrome/renderer/renderer_main_platform_delegate.h
+++ b/content/renderer/renderer_main_platform_delegate.h
diff --git a/chrome/renderer/renderer_main_platform_delegate_linux.cc b/content/renderer/renderer_main_platform_delegate_linux.cc
index 9a201bc..b20caf9 100644
--- a/chrome/renderer/renderer_main_platform_delegate_linux.cc
+++ b/content/renderer/renderer_main_platform_delegate_linux.cc
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/renderer/renderer_main_platform_delegate.h"
+#include "content/renderer/renderer_main_platform_delegate.h"
#include "base/command_line.h"
+#include "content/common/content_switches.h"
#include "seccompsandbox/sandbox.h"
-#include "chrome/common/chrome_switches.h"
-
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
const MainFunctionParams& parameters)
: parameters_(parameters) {
diff --git a/chrome/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
index d3ac431..86edec7 100644
--- a/chrome/renderer/renderer_main_platform_delegate_mac.mm
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/renderer/renderer_main_platform_delegate.h"
+#include "content/renderer/renderer_main_platform_delegate.h"
#import <Cocoa/Cocoa.h>
#include "base/command_line.h"
-#include "chrome/common/chrome_switches.h"
#import "content/common/chrome_application_mac.h"
+#include "content/common/content_switches.h"
#include "content/common/sandbox_mac.h"
#include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
diff --git a/chrome/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc
index ba104f9..50a8059 100644
--- a/chrome/renderer/renderer_main_platform_delegate_win.cc
+++ b/content/renderer/renderer_main_platform_delegate_win.cc
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/renderer/renderer_main_platform_delegate.h"
+#include "content/renderer/renderer_main_platform_delegate.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/common/chrome_constants.h"
-#include "chrome/common/chrome_switches.h"
+#include "content/common/content_switches.h"
#include "content/common/injection_test_dll.h"
#include "sandbox/src/sandbox.h"
#include "unicode/timezone.h"