summaryrefslogtreecommitdiffstats
path: root/content/utility
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-21 19:52:47 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-21 19:52:47 +0000
commit91355a856f83888eab29f6a3299aa7c0fe69c3e3 (patch)
tree99ecc647ffb3988279cc768a5a00b7d5a32125ce /content/utility
parent8463d75aed2831944bfc7471ef239b0c6e31a6ca (diff)
downloadchromium_src-91355a856f83888eab29f6a3299aa7c0fe69c3e3.zip
chromium_src-91355a856f83888eab29f6a3299aa7c0fe69c3e3.tar.gz
chromium_src-91355a856f83888eab29f6a3299aa7c0fe69c3e3.tar.bz2
Move content's a plugin, ppapi_plugin, utility, and worker subdirectories to the content namespace.
Review URL: https://codereview.chromium.org/11231016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163210 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/utility')
-rw-r--r--content/utility/utility_main.cc8
-rw-r--r--content/utility/utility_thread_impl.cc10
-rw-r--r--content/utility/utility_thread_impl.h7
3 files changed, 17 insertions, 8 deletions
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc
index 6aeff1d..549af2c 100644
--- a/content/utility/utility_main.cc
+++ b/content/utility/utility_main.cc
@@ -17,8 +17,10 @@
#include "sandbox/win/src/sandbox.h"
#endif
+namespace content {
+
// Mainline routine for running as the utility process.
-int UtilityMain(const content::MainFunctionParams& parameters) {
+int UtilityMain(const MainFunctionParams& parameters) {
// The main message loop of the utility process.
MessageLoop main_message_loop;
base::PlatformThread::SetName("CrUtilityMain");
@@ -28,7 +30,7 @@ int UtilityMain(const content::MainFunctionParams& parameters) {
#if defined(OS_LINUX)
// Initialize the sandbox before any thread is created.
- content::InitializeSandbox();
+ InitializeSandbox();
#endif
ChildProcess utility_process;
@@ -49,3 +51,5 @@ int UtilityMain(const content::MainFunctionParams& parameters) {
return 0;
}
+
+} // namespace content
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
index ebff590..af9c033 100644
--- a/content/utility/utility_thread_impl.cc
+++ b/content/utility/utility_thread_impl.cc
@@ -24,6 +24,8 @@
#include "ui/gfx/gtk_util.h"
#endif
+namespace content {
+
namespace {
template<typename SRC, typename DEST>
@@ -38,9 +40,9 @@ void ConvertVector(const SRC& src, DEST* dest) {
UtilityThreadImpl::UtilityThreadImpl()
: batch_mode_(false) {
ChildProcess::current()->AddRefProcess();
- webkit_platform_support_.reset(new content::WebKitPlatformSupportImpl);
+ webkit_platform_support_.reset(new WebKitPlatformSupportImpl);
WebKit::initialize(webkit_platform_support_.get());
- content::GetContentClient()->utility()->UtilityThreadStarted();
+ GetContentClient()->utility()->UtilityThreadStarted();
}
UtilityThreadImpl::~UtilityThreadImpl() {
@@ -70,7 +72,7 @@ void UtilityThreadImpl::ReleaseCachedFonts() {
bool UtilityThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
- if (content::GetContentClient()->utility()->OnMessageReceived(msg))
+ if (GetContentClient()->utility()->OnMessageReceived(msg))
return true;
bool handled = true;
@@ -128,3 +130,5 @@ void UtilityThreadImpl::OnLoadPlugins(
ReleaseProcessIfNeeded();
}
#endif
+
+} // namespace content
diff --git a/content/utility/utility_thread_impl.h b/content/utility/utility_thread_impl.h
index 3e7fd9c..12c76de 100644
--- a/content/utility/utility_thread_impl.h
+++ b/content/utility/utility_thread_impl.h
@@ -18,10 +18,9 @@ class FilePath;
namespace content {
class WebKitPlatformSupportImpl;
-}
// This class represents the background thread where the utility task runs.
-class UtilityThreadImpl : public content::UtilityThread,
+class UtilityThreadImpl : public UtilityThread,
public ChildThread {
public:
UtilityThreadImpl();
@@ -49,9 +48,11 @@ class UtilityThreadImpl : public content::UtilityThread,
// True when we're running in batch mode.
bool batch_mode_;
- scoped_ptr<content::WebKitPlatformSupportImpl> webkit_platform_support_;
+ scoped_ptr<WebKitPlatformSupportImpl> webkit_platform_support_;
DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl);
};
+} // namespace content
+
#endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_