| OLD | NEW |
| 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 "chrome/browser/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 6 | 6 |
| 7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "apps/app_load_service.h" | 10 #include "apps/app_load_service.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // again. | 292 // again. |
| 293 const bool silent_launch = command_line.HasSwitch(switches::kSilentLaunch); | 293 const bool silent_launch = command_line.HasSwitch(switches::kSilentLaunch); |
| 294 | 294 |
| 295 if (!silent_launch) { | 295 if (!silent_launch) { |
| 296 StartupBrowserCreatorImpl lwp(cur_dir, command_line, this, is_first_run); | 296 StartupBrowserCreatorImpl lwp(cur_dir, command_line, this, is_first_run); |
| 297 const std::vector<GURL> urls_to_launch = | 297 const std::vector<GURL> urls_to_launch = |
| 298 GetURLsFromCommandLine(command_line, cur_dir, profile); | 298 GetURLsFromCommandLine(command_line, cur_dir, profile); |
| 299 chrome::HostDesktopType host_desktop_type = | 299 chrome::HostDesktopType host_desktop_type = |
| 300 chrome::HOST_DESKTOP_TYPE_NATIVE; | 300 chrome::HOST_DESKTOP_TYPE_NATIVE; |
| 301 | 301 |
| 302 #if defined(OS_WIN) && defined(USE_ASH) | 302 #if defined(USE_ASH) && !defined(OS_CHROMEOS) |
| 303 // We want to maintain only one type of instance for now, either ASH | 303 // We want to maintain only one type of instance for now, either ASH |
| 304 // or desktop. | 304 // or desktop. |
| 305 // TODO(shrikant): Remove this code once we decide on running both desktop | 305 // TODO(shrikant): Remove this code once we decide on running both desktop |
| 306 // and ASH instances side by side. | 306 // and ASH instances side by side. |
| 307 if (ash::Shell::HasInstance()) | 307 if (ash::Shell::HasInstance()) |
| 308 host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; | 308 host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; |
| 309 #endif | 309 #endif |
| 310 | 310 |
| 311 const bool launched = lwp.Launch(profile, urls_to_launch, | 311 const bool launched = lwp.Launch(profile, urls_to_launch, |
| 312 in_synchronous_profile_launch_, | 312 in_synchronous_profile_launch_, |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 } | 728 } |
| 729 | 729 |
| 730 if (command_line.HasSwitch(switches::kProfileDirectory)) { | 730 if (command_line.HasSwitch(switches::kProfileDirectory)) { |
| 731 return user_data_dir.Append( | 731 return user_data_dir.Append( |
| 732 command_line.GetSwitchValuePath(switches::kProfileDirectory)); | 732 command_line.GetSwitchValuePath(switches::kProfileDirectory)); |
| 733 } | 733 } |
| 734 | 734 |
| 735 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 735 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
| 736 user_data_dir); | 736 user_data_dir); |
| 737 } | 737 } |
| OLD | NEW |