OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/profiles/profile_window.h" | 5 #include "chrome/browser/profiles/profile_window.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 if (!always_create) { | 255 if (!always_create) { |
256 Browser* browser = chrome::FindTabbedBrowser(profile, false, desktop_type); | 256 Browser* browser = chrome::FindTabbedBrowser(profile, false, desktop_type); |
257 if (browser) { | 257 if (browser) { |
258 browser->window()->Activate(); | 258 browser->window()->Activate(); |
259 return; | 259 return; |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 content::RecordAction(UserMetricsAction("NewWindow")); | 263 content::RecordAction(UserMetricsAction("NewWindow")); |
264 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 264 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
265 int return_code; | |
266 StartupBrowserCreator browser_creator; | 265 StartupBrowserCreator browser_creator; |
267 browser_creator.LaunchBrowser(command_line, profile, base::FilePath(), | 266 browser_creator.LaunchBrowser( |
268 process_startup, is_first_run, &return_code); | 267 command_line, profile, base::FilePath(), process_startup, is_first_run); |
269 #endif // defined(OS_IOS) | 268 #endif // defined(OS_IOS) |
270 } | 269 } |
271 | 270 |
272 void SwitchToProfile(const base::FilePath& path, | 271 void SwitchToProfile(const base::FilePath& path, |
273 chrome::HostDesktopType desktop_type, | 272 chrome::HostDesktopType desktop_type, |
274 bool always_create, | 273 bool always_create, |
275 ProfileManager::CreateCallback callback, | 274 ProfileManager::CreateCallback callback, |
276 ProfileMetrics::ProfileOpen metric) { | 275 ProfileMetrics::ProfileOpen metric) { |
277 ProfileMetrics::LogProfileSwitch(metric, | 276 ProfileMetrics::LogProfileSwitch(metric, |
278 g_browser_process->profile_manager(), | 277 g_browser_process->profile_manager(), |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: | 507 case BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR: |
509 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; | 508 *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; |
510 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; | 509 *tutorial_mode = TUTORIAL_MODE_SHOW_ERROR; |
511 return; | 510 return; |
512 default: | 511 default: |
513 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; | 512 *bubble_view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; |
514 } | 513 } |
515 } | 514 } |
516 | 515 |
517 } // namespace profiles | 516 } // namespace profiles |
OLD | NEW |