Chromium Code Reviews| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include <shlobj.h> // Must be before propkey. | 7 #include <shlobj.h> // Must be before propkey. |
| 8 #include <propkey.h> | 8 #include <propkey.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 | 10 |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/win/scoped_comptr.h" | 14 #include "base/win/scoped_comptr.h" |
| 15 #include "base/win/scoped_propvariant.h" | 15 #include "base/win/scoped_propvariant.h" |
| 16 #include "base/win/windows_version.h" | 16 #include "base/win/windows_version.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profiles/profile_info_cache.h" | 19 #include "chrome/browser/profiles/profile_info_cache.h" |
| 20 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
| 21 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" | 21 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" |
| 22 #include "chrome/browser/profiles/profiles_state.h" | 22 #include "chrome/browser/profiles/profiles_state.h" |
| 23 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
| 24 #include "chrome/browser/ui/browser_window.h" | 24 #include "chrome/browser/ui/browser_window.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/installer/util/browser_distribution.h" | 26 #include "chrome/installer/util/browser_distribution.h" |
| 27 #include "chrome/test/base/in_process_browser_test.h" | 27 #include "chrome/test/base/in_process_browser_test.h" |
| 28 #include "chrome/test/base/test_switches.h" | 28 #include "chrome/test/base/test_switches.h" |
| 29 #include "content/public/test/test_utils.cc" | 29 #include "content/public/test/test_utils.h" |
|
scottmg
2013/11/22 18:31:53
there was a few of these before... not sure how th
jam
2013/11/22 19:19:18
yeah no idea, I had gone through the rest of the c
| |
| 30 #include "ui/views/win/hwnd_util.h" | 30 #include "ui/views/win/hwnd_util.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // An observer that resumes test code after a new profile is initialized by | 34 // An observer that resumes test code after a new profile is initialized by |
| 35 // quitting the message loop it's blocked on. | 35 // quitting the message loop it's blocked on. |
| 36 void UnblockOnProfileCreation(Profile* profile, | 36 void UnblockOnProfileCreation(Profile* profile, |
| 37 Profile::CreateStatus status) { | 37 Profile::CreateStatus status) { |
| 38 if (status == Profile::CREATE_STATUS_INITIALIZED) | 38 if (status == Profile::CREATE_STATUS_INITIALIZED) |
| 39 base::MessageLoop::current()->Quit(); | 39 base::MessageLoop::current()->Quit(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 ValidateBrowserWindowProperties( | 140 ValidateBrowserWindowProperties( |
| 141 browser(), UTF8ToUTF16(browser()->profile()->GetProfileName())); | 141 browser(), UTF8ToUTF16(browser()->profile()->GetProfileName())); |
| 142 | 142 |
| 143 // The second profile's name should be part of the relaunch name. | 143 // The second profile's name should be part of the relaunch name. |
| 144 Browser* profile2_browser = | 144 Browser* profile2_browser = |
| 145 CreateBrowser(profile_manager->GetProfileByPath(path_profile2)); | 145 CreateBrowser(profile_manager->GetProfileByPath(path_profile2)); |
| 146 size_t profile2_index = cache.GetIndexOfProfileWithPath(path_profile2); | 146 size_t profile2_index = cache.GetIndexOfProfileWithPath(path_profile2); |
| 147 ValidateBrowserWindowProperties( | 147 ValidateBrowserWindowProperties( |
| 148 profile2_browser, cache.GetNameOfProfileAtIndex(profile2_index)); | 148 profile2_browser, cache.GetNameOfProfileAtIndex(profile2_index)); |
| 149 } | 149 } |
| OLD | NEW |