| Index: chrome/browser/extensions/activity_log/counting_policy_unittest.cc
|
| diff --git a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
|
| index 8b08a4abf519791ef0503dcaef8133ffc4b31d36..42f742029321d9c4880899f2948caed48ce60007 100644
|
| --- a/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
|
| +++ b/chrome/browser/extensions/activity_log/counting_policy_unittest.cc
|
| @@ -48,19 +48,17 @@ namespace extensions {
|
| class CountingPolicyTest : public testing::Test {
|
| public:
|
| CountingPolicyTest()
|
| - : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
|
| - saved_cmdline_(base::CommandLine::NO_PROGRAM) {
|
| + : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
|
| #if defined OS_CHROMEOS
|
| test_user_manager_.reset(new chromeos::ScopedTestUserManager());
|
| #endif
|
| - base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
|
| - saved_cmdline_ = *base::CommandLine::ForCurrentProcess();
|
| profile_.reset(new TestingProfile());
|
| - base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| - switches::kEnableExtensionActivityLogging);
|
| + base::CommandLine::ForCurrentProcess()->
|
| + AppendSwitch(switches::kEnableExtensionActivityLogging);
|
| + base::CommandLine no_program_command_line(base::CommandLine::NO_PROGRAM);
|
| extension_service_ = static_cast<TestExtensionSystem*>(
|
| ExtensionSystem::Get(profile_.get()))->CreateExtensionService
|
| - (&command_line, base::FilePath(), false);
|
| + (&no_program_command_line, base::FilePath(), false);
|
| }
|
|
|
| ~CountingPolicyTest() override {
|
| @@ -70,8 +68,6 @@ class CountingPolicyTest : public testing::Test {
|
| base::RunLoop().RunUntilIdle();
|
| profile_.reset(NULL);
|
| base::RunLoop().RunUntilIdle();
|
| - // Restore the original command line and undo the affects of SetUp().
|
| - *base::CommandLine::ForCurrentProcess() = saved_cmdline_;
|
| }
|
|
|
| // Wait for the task queue for the specified thread to empty.
|
| @@ -526,11 +522,6 @@ class CountingPolicyTest : public testing::Test {
|
| ExtensionService* extension_service_;
|
| std::unique_ptr<TestingProfile> profile_;
|
| content::TestBrowserThreadBundle thread_bundle_;
|
| - // Used to preserve a copy of the original command line.
|
| - // The test framework will do this itself as well. However, by then,
|
| - // it is too late to call ActivityLog::RecomputeLoggingIsEnabled() in
|
| - // TearDown().
|
| - base::CommandLine saved_cmdline_;
|
|
|
| #if defined OS_CHROMEOS
|
| chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
|
|
|