summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:35:29 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:35:29 +0000
commitf3a4f3047da53e82e76de03300899a2b86868737 (patch)
tree253f6cf9211b928623df0ec0389c492b96e9f0ec /chrome
parent04e29f422eb66e704fea9a64abd9295f00cc9124 (diff)
downloadchromium_src-f3a4f3047da53e82e76de03300899a2b86868737.zip
chromium_src-f3a4f3047da53e82e76de03300899a2b86868737.tar.gz
chromium_src-f3a4f3047da53e82e76de03300899a2b86868737.tar.bz2
Mask the BrokerServices class behind an ifdef for Windows only; Linux and Mac have their own sandboxes. Remove the corresponding stubs from temp_scaffolding_stubs.h.
BUG=none TEST=none Review URL: http://codereview.chromium.org/173228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_process.h8
-rw-r--r--chrome/browser/browser_process_impl.cc4
-rw-r--r--chrome/browser/browser_process_impl.h8
-rw-r--r--chrome/common/temp_scaffolding_stubs.h25
-rw-r--r--chrome/test/testing_browser_process.h8
5 files changed, 23 insertions, 30 deletions
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index ba24f6c..5915169 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -34,9 +34,13 @@ namespace base {
class Thread;
class WaitableEvent;
}
+
+#if defined(OS_WIN)
namespace sandbox {
class BrokerServices;
}
+#endif // defined(OS_WIN)
+
namespace printing {
class PrintJobManager;
}
@@ -103,13 +107,15 @@ class BrowserProcess {
virtual base::Thread* background_x11_thread() = 0;
#endif
+#if defined(OS_WIN)
virtual sandbox::BrokerServices* broker_services() = 0;
+ virtual void InitBrokerServices(sandbox::BrokerServices*) = 0;
+#endif // defined(OS_WIN)
virtual IconManager* icon_manager() = 0;
virtual ThumbnailGenerator* GetThumbnailGenerator() = 0;
- virtual void InitBrokerServices(sandbox::BrokerServices*) = 0;
virtual AutomationProviderList* InitAutomationProviderList() = 0;
virtual void InitDebuggerWrapper(int port) = 0;
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 8024370..68a3dc3 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -123,8 +123,10 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
created_db_thread_(false),
created_profile_manager_(false),
created_local_state_(false),
+#if defined(OS_WIN)
initialized_broker_services_(false),
broker_services_(NULL),
+#endif // defined(OS_WIN)
created_icon_manager_(false),
created_debugger_wrapper_(false),
created_devtools_manager_(false),
@@ -392,6 +394,7 @@ void BrowserProcessImpl::CreateLocalState() {
local_state_.reset(new PrefService(local_state_path, file_thread()));
}
+#if defined(OS_WIN)
void BrowserProcessImpl::InitBrokerServices(
sandbox::BrokerServices* broker_services) {
DCHECK(!initialized_broker_services_ && broker_services_ == NULL);
@@ -399,6 +402,7 @@ void BrowserProcessImpl::InitBrokerServices(
initialized_broker_services_ = true;
broker_services_ = broker_services;
}
+#endif // defined(OS_WIN)
void BrowserProcessImpl::CreateIconManager() {
DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL);
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 3840836..5bf3509 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -32,7 +32,7 @@ class NotificationService;
// Real implementation of BrowserProcess that creates and returns the services.
class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
public:
- BrowserProcessImpl(const CommandLine& command_line);
+ explicit BrowserProcessImpl(const CommandLine& command_line);
virtual ~BrowserProcessImpl();
virtual void EndSession();
@@ -96,6 +96,7 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
return local_state_.get();
}
+#if defined(OS_WIN)
virtual sandbox::BrokerServices* broker_services() {
// TODO(abarth): DCHECK(CalledOnValidThread());
// See <http://b/1287166>.
@@ -103,6 +104,7 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
return NULL;
return broker_services_;
}
+#endif // defined(OS_WIN)
virtual DebuggerWrapper* debugger_wrapper() {
DCHECK(CalledOnValidThread());
@@ -216,7 +218,9 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
void CreateDevToolsManager();
void CreateGoogleURLTracker();
+#if defined(OS_WIN)
void InitBrokerServices(sandbox::BrokerServices* broker_services);
+#endif // defined(OS_WIN)
bool created_resource_dispatcher_host_;
scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_;
@@ -243,8 +247,10 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
bool created_local_state_;
scoped_ptr<PrefService> local_state_;
+#if defined(OS_WIN)
bool initialized_broker_services_;
sandbox::BrokerServices* broker_services_;
+#endif // defined(OS_WIN)
bool created_icon_manager_;
scoped_ptr<IconManager> icon_manager_;
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index ea2c92b..f9af2e8 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -56,7 +56,6 @@ void InstallJankometer(const CommandLine&);
//---------------------------------------------------------------------------
// These stubs are for BrowserProcessImpl
-class CancelableTask;
class ViewMsg_Print_Params;
// Printing is all (obviously) not implemented.
@@ -125,30 +124,6 @@ class PrintJobManager {
} // namespace printing
-namespace sandbox {
-
-enum ResultCode {
- SBOX_ALL_OK = 0,
- SBOX_ERROR_GENERIC = 1,
- SBOX_ERROR_BAD_PARAMS = 2,
- SBOX_ERROR_UNSUPPORTED = 3,
- SBOX_ERROR_NO_SPACE = 4,
- SBOX_ERROR_INVALID_IPC = 5,
- SBOX_ERROR_FAILED_IPC = 6,
- SBOX_ERROR_NO_HANDLE = 7,
- SBOX_ERROR_UNEXPECTED_CALL = 8,
- SBOX_ERROR_WAIT_ALREADY_CALLED = 9,
- SBOX_ERROR_CHANNEL_ERROR = 10,
- SBOX_ERROR_LAST
-};
-
-class BrokerServices {
- public:
- void Init() { NOTIMPLEMENTED(); }
-};
-
-} // namespace sandbox
-
struct ViewHostMsg_DidPrintPage_Params;
class InputWindowDelegate {
diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h
index b4bc3fc..bdfe555 100644
--- a/chrome/test/testing_browser_process.h
+++ b/chrome/test/testing_browser_process.h
@@ -78,10 +78,15 @@ class TestingBrowserProcess : public BrowserProcess {
return NULL;
}
+#if defined(OS_WIN)
virtual sandbox::BrokerServices* broker_services() {
return NULL;
}
+ virtual void InitBrokerServices(sandbox::BrokerServices*) {
+ }
+#endif
+
virtual DebuggerWrapper* debugger_wrapper() {
return NULL;
}
@@ -102,9 +107,6 @@ class TestingBrowserProcess : public BrowserProcess {
return NULL;
}
- virtual void InitBrokerServices(sandbox::BrokerServices*) {
- }
-
virtual AutomationProviderList* InitAutomationProviderList() {
return NULL;
}