diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-29 03:44:44 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-29 03:44:44 +0000 |
commit | badf5cf5f14c65f6c799ef1fec77cde8351339c2 (patch) | |
tree | 83690887c035e4b457f00404f126f95ad1a90c06 /chrome/browser/chrome_browser_main_unittest.cc | |
parent | 8cc9738eff9c169487e8356947d88640659fc497 (diff) | |
download | chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.zip chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.gz chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.bz2 |
Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing this.
-got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo
-got rid of the duplicated code to initialize the broker
-since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs.
BUG=98716
Review URL: http://codereview.chromium.org/8414020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main_unittest.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main_unittest.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/chrome/browser/chrome_browser_main_unittest.cc b/chrome/browser/chrome_browser_main_unittest.cc index 9bcd07f..e682c9c 100644 --- a/chrome/browser/chrome_browser_main_unittest.cc +++ b/chrome/browser/chrome_browser_main_unittest.cc @@ -12,7 +12,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_pref_service.h" #include "content/common/main_function_params.h" -#include "content/common/sandbox_init_wrapper.h" #include "content/public/browser/content_browser_client.h" #include "net/socket/client_socket_pool_base.h" #include "testing/gtest/include/gtest/gtest.h" @@ -20,12 +19,8 @@ class BrowserMainTest : public testing::Test { public: BrowserMainTest() : command_line_(CommandLine::NO_PROGRAM) {} - protected: - virtual void SetUp() { - sandbox_init_wrapper_.reset(new SandboxInitWrapper()); - } - scoped_ptr<SandboxInitWrapper> sandbox_init_wrapper_; + protected: TestingPrefService pref_service_; CommandLine command_line_; }; @@ -33,8 +28,7 @@ class BrowserMainTest : public testing::Test { TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) { command_line_.AppendSwitchASCII(switches::kSocketReusePolicy, "0"); - scoped_ptr<MainFunctionParams> params( - new MainFunctionParams(command_line_, *sandbox_init_wrapper_, NULL)); + scoped_ptr<MainFunctionParams> params(new MainFunctionParams(command_line_)); ScopedVector<content::BrowserMainParts> bwv; content::GetContentClient()->browser()->CreateBrowserMainParts( *params, &(bwv.get())); @@ -49,8 +43,7 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) { } TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Random) { - scoped_ptr<MainFunctionParams> params( - new MainFunctionParams(command_line_, *sandbox_init_wrapper_, NULL)); + scoped_ptr<MainFunctionParams> params(new MainFunctionParams(command_line_)); ScopedVector<content::BrowserMainParts> bwv; content::GetContentClient()->browser()->CreateBrowserMainParts( *params, &(bwv.get())); @@ -72,8 +65,7 @@ TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Random) { TEST_F(BrowserMainTest, WarmConnectionFieldTrial_Invalid) { command_line_.AppendSwitchASCII(switches::kSocketReusePolicy, "100"); - scoped_ptr<MainFunctionParams> params( - new MainFunctionParams(command_line_, *sandbox_init_wrapper_, NULL)); + scoped_ptr<MainFunctionParams> params(new MainFunctionParams(command_line_)); // This test ends up launching a new process, and that doesn't initialize the // ContentClient interfaces. ScopedVector<content::BrowserMainParts> bwv; |