summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 07:03:06 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 07:03:06 +0000
commitbbd90756e9bb2fff3db1ab8b3640b9f2fa8c9335 (patch)
tree8ebb1691dddb70e3c09e305ef0a9f0c2bcaf7c0f
parenta703dc79598c2a646d2b41fecbe8ef80113ab685 (diff)
downloadchromium_src-bbd90756e9bb2fff3db1ab8b3640b9f2fa8c9335.zip
chromium_src-bbd90756e9bb2fff3db1ab8b3640b9f2fa8c9335.tar.gz
chromium_src-bbd90756e9bb2fff3db1ab8b3640b9f2fa8c9335.tar.bz2
Enable component extensions for DefaultProfile used in login screen dialogs
BUG=chromium-os:12741 TEST=manual Review URL: http://codereview.chromium.org/6676086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79526 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_main.cc2
-rw-r--r--chrome/browser/chromeos/login/login_browsertest.cc7
-rw-r--r--chrome/browser/profiles/profile_manager.cc5
3 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index b4db556..fd1329e 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1430,7 +1430,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
// This forces the ProfileManager to be created and register for the
// notification it needs to track the logged in user.
- g_browser_process->profile_manager()->GetDefaultProfile();
+ g_browser_process->profile_manager();
// Allow access to file:// on ChromeOS for tests.
if (parsed_command_line.HasSwitch(switches::kAllowFileAccess)) {
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index fa76953..b1178ac 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -92,8 +92,9 @@ IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) {
Profile* profile = browser()->profile();
EXPECT_EQ("Default", profile->GetPath().BaseName().value());
EXPECT_TRUE(profile->IsOffTheRecord());
- // Ensure there's no extension service for this profile.
- EXPECT_EQ(NULL, profile->GetExtensionService());
+ // Ensure there's extension service for this profile.
+ EXPECT_NE(static_cast<ExtensionService*>(NULL),
+ profile->GetExtensionService());
}
} // namespace chromeos
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 29c18b2..86c87f4 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -152,8 +152,9 @@ Profile* ProfileManager::GetDefaultProfile(const FilePath& user_data_dir) {
// TODO(davemoore) Fix the tests so they allow OTR profiles.
if (!command_line.HasSwitch(switches::kTestType) ||
command_line.HasSwitch(switches::kLoginProfile)) {
- // Don't init extensions for this profile
- profile = GetProfile(default_profile_dir, false);
+ // Init extensions for this profile to be able to use component extensions
+ // for this profile. HelpApp is as example of component extension.
+ profile = GetProfile(default_profile_dir, true);
profile = profile->GetOffTheRecordProfile();
} else {
profile = GetProfile(default_profile_dir, true);