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

Unified Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 15695010: Add ProfileManager::AllowGetDefaultProfile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
diff --git a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
index f7eb6a9a344ffc8e00fb7868d0a8ac1c8eb75303..fb98e58d7eaaa94b4ce7be91a9269a97301c69ba 100644
--- a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
+++ b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
+#include "ash/shell.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "chrome/browser/chrome_browser_main.h"
@@ -62,19 +63,17 @@ ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() {
}
void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
+ // For OS_CHROMEOS, initialization order needs to be carefully controlled,
+ // so OpenAsh is called from ChromeBrowserMainPartsChromeos.
+#if !defined(OS_CHROMEOS)
if (chrome::ShouldOpenAshOnStartup()) {
chrome::OpenAsh();
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshDisableTabScrubbing)) {
- TabScrubber::GetInstance();
- }
} else {
-#if !defined(OS_CHROMEOS)
gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateWin);
ui::SelectFileDialog::SetShellDialogsDelegate(
&g_shell_dialogs_delegate.Get());
-#endif
}
+#endif
#if defined(FILE_MANAGER_EXTENSION)
ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
@@ -82,10 +81,19 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
}
void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
+ // Initialize TabScrubber after the Ash Shell has been initialized.
+ if (ash::Shell::HasInstance() &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshDisableTabScrubbing)) {
+ TabScrubber::GetInstance();
+ }
}
void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
+ // For OS_CHROMEOS, CloseAsh is called from ChromeBrowserMainPartsChromeos.
+#if !defined(OS_CHROMEOS)
chrome::CloseAsh();
+#endif
}
namespace chrome {
« chrome/browser/profiles/profile_manager.h ('K') | « chrome/browser/profiles/profile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698