| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <windows.h> | 5 #include <windows.h> |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "chrome/browser/profile_manager.h" | 9 #include "chrome/browser/profile_manager.h" |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } else { | 119 } else { |
| 120 return NULL; | 120 return NULL; |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 void ProfileManager::NewWindowWithProfile(Profile* profile) { | 124 void ProfileManager::NewWindowWithProfile(Profile* profile) { |
| 125 DCHECK(profile); | 125 DCHECK(profile); |
| 126 | 126 |
| 127 Browser* new_browser = new Browser(gfx::Rect(), SW_SHOWNORMAL, profile, | 127 Browser* new_browser = new Browser(gfx::Rect(), SW_SHOWNORMAL, profile, |
| 128 BrowserType::TABBED_BROWSER, L""); | 128 BrowserType::TABBED_BROWSER, L""); |
| 129 new_browser->AddTabWithURL(GURL(), PageTransition::TYPED, true, NULL); | 129 new_browser->AddTabWithURL(GURL(), GURL(), PageTransition::TYPED, true, |
| 130 NULL); |
| 130 new_browser->Show(); | 131 new_browser->Show(); |
| 131 } | 132 } |
| 132 | 133 |
| 133 Profile* ProfileManager::AddProfileByID(const std::wstring& id) { | 134 Profile* ProfileManager::AddProfileByID(const std::wstring& id) { |
| 134 AvailableProfile* available = GetAvailableProfileByID(id); | 135 AvailableProfile* available = GetAvailableProfileByID(id); |
| 135 if (!available) | 136 if (!available) |
| 136 return NULL; | 137 return NULL; |
| 137 | 138 |
| 138 std::wstring path; | 139 std::wstring path; |
| 139 PathService::Get(chrome::DIR_USER_DATA, &path); | 140 PathService::Get(chrome::DIR_USER_DATA, &path); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 return profile; | 300 return profile; |
| 300 } | 301 } |
| 301 | 302 |
| 302 // static | 303 // static |
| 303 std::wstring ProfileManager::CanonicalizeID(const std::wstring& id) { | 304 std::wstring ProfileManager::CanonicalizeID(const std::wstring& id) { |
| 304 std::wstring no_whitespace; | 305 std::wstring no_whitespace; |
| 305 TrimWhitespace(id, TRIM_ALL, &no_whitespace); | 306 TrimWhitespace(id, TRIM_ALL, &no_whitespace); |
| 306 return StringToLowerASCII(no_whitespace); | 307 return StringToLowerASCII(no_whitespace); |
| 307 } | 308 } |
| 308 | 309 |
| OLD | NEW |