Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: chrome/browser/extensions/location_bar_controller_unittest.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/extensions/active_script_controller.h" 10 #include "chrome/browser/extensions/active_script_controller.h"
(...skipping 28 matching lines...) Expand all
39 active_script_override_.reset(new FeatureSwitch::ScopedOverride( 39 active_script_override_.reset(new FeatureSwitch::ScopedOverride(
40 FeatureSwitch::scripts_require_action(), true)); 40 FeatureSwitch::scripts_require_action(), true));
41 41
42 ChromeRenderViewHostTestHarness::SetUp(); 42 ChromeRenderViewHostTestHarness::SetUp();
43 #if defined OS_CHROMEOS 43 #if defined OS_CHROMEOS
44 test_user_manager_.reset(new chromeos::ScopedTestUserManager()); 44 test_user_manager_.reset(new chromeos::ScopedTestUserManager());
45 #endif 45 #endif
46 TabHelper::CreateForWebContents(web_contents()); 46 TabHelper::CreateForWebContents(web_contents());
47 // Create an ExtensionService so the LocationBarController can find its 47 // Create an ExtensionService so the LocationBarController can find its
48 // extensions. 48 // extensions.
49 CommandLine command_line(CommandLine::NO_PROGRAM); 49 base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
50 Profile* profile = 50 Profile* profile =
51 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); 51 Profile::FromBrowserContext(web_contents()->GetBrowserContext());
52 extension_service_ = static_cast<TestExtensionSystem*>( 52 extension_service_ = static_cast<TestExtensionSystem*>(
53 ExtensionSystem::Get(profile))->CreateExtensionService( 53 ExtensionSystem::Get(profile))->CreateExtensionService(
54 &command_line, base::FilePath(), false); 54 &command_line, base::FilePath(), false);
55 } 55 }
56 56
57 void TearDown() override { 57 void TearDown() override {
58 #if defined OS_CHROMEOS 58 #if defined OS_CHROMEOS
59 test_user_manager_.reset(); 59 test_user_manager_.reset();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 NavigateAndCommit(GURL("http://www.yahoo.com")); 188 NavigateAndCommit(GURL("http://www.yahoo.com"));
189 189
190 EXPECT_EQ("Hello", page_action.GetTitle(tab_id())); 190 EXPECT_EQ("Hello", page_action.GetTitle(tab_id()));
191 EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id())); 191 EXPECT_EQ(GURL(), page_action.GetPopupUrl(tab_id()));
192 EXPECT_FALSE(extension_action_api->ExtensionWantsToRun(extension, 192 EXPECT_FALSE(extension_action_api->ExtensionWantsToRun(extension,
193 web_contents())); 193 web_contents()));
194 } 194 }
195 195
196 } // namespace 196 } // namespace
197 } // namespace extensions 197 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/install_verifier.cc ('k') | chrome/browser/extensions/pack_extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698