| 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 chrome::startup::IsProcessStartup process_startup, | 500 chrome::startup::IsProcessStartup process_startup, |
| 501 chrome::startup::IsFirstRun is_first_run, | 501 chrome::startup::IsFirstRun is_first_run, |
| 502 chrome::HostDesktopType desktop_type, | 502 chrome::HostDesktopType desktop_type, |
| 503 bool always_create) { | 503 bool always_create) { |
| 504 #if defined(OS_IOS) | 504 #if defined(OS_IOS) |
| 505 NOTREACHED(); | 505 NOTREACHED(); |
| 506 #else | 506 #else |
| 507 DCHECK(profile); | 507 DCHECK(profile); |
| 508 | 508 |
| 509 if (!always_create) { | 509 if (!always_create) { |
| 510 Browser* browser = browser::FindTabbedBrowser(profile, false, desktop_type); | 510 Browser* browser = chrome::FindTabbedBrowser(profile, false, desktop_type); |
| 511 if (browser) { | 511 if (browser) { |
| 512 browser->window()->Activate(); | 512 browser->window()->Activate(); |
| 513 return; | 513 return; |
| 514 } | 514 } |
| 515 } | 515 } |
| 516 | 516 |
| 517 content::RecordAction(UserMetricsAction("NewWindow")); | 517 content::RecordAction(UserMetricsAction("NewWindow")); |
| 518 CommandLine command_line(CommandLine::NO_PROGRAM); | 518 CommandLine command_line(CommandLine::NO_PROGRAM); |
| 519 int return_code; | 519 int return_code; |
| 520 StartupBrowserCreator browser_creator; | 520 StartupBrowserCreator browser_creator; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 ProfileManager::ProfileInfo::ProfileInfo( | 1059 ProfileManager::ProfileInfo::ProfileInfo( |
| 1060 Profile* profile, | 1060 Profile* profile, |
| 1061 bool created) | 1061 bool created) |
| 1062 : profile(profile), | 1062 : profile(profile), |
| 1063 created(created) { | 1063 created(created) { |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 ProfileManager::ProfileInfo::~ProfileInfo() { | 1066 ProfileManager::ProfileInfo::~ProfileInfo() { |
| 1067 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1067 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
| 1068 } | 1068 } |
| OLD | NEW |