| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/webui/options/supervised_user_create_confirm_handler
.h" | 5 #include "chrome/browser/ui/webui/options/supervised_user_create_confirm_handler
.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 return; | 152 return; |
| 153 | 153 |
| 154 base::FilePath profile_file_path; | 154 base::FilePath profile_file_path; |
| 155 if (!base::GetValueAsFilePath(*file_path_value, &profile_file_path)) | 155 if (!base::GetValueAsFilePath(*file_path_value, &profile_file_path)) |
| 156 return; | 156 return; |
| 157 | 157 |
| 158 Profile* profile = g_browser_process->profile_manager()-> | 158 Profile* profile = g_browser_process->profile_manager()-> |
| 159 GetProfileByPath(profile_file_path); | 159 GetProfileByPath(profile_file_path); |
| 160 DCHECK(profile); | 160 DCHECK(profile); |
| 161 | 161 |
| 162 Browser* browser = | |
| 163 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); | |
| 164 chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; | |
| 165 if (browser) | |
| 166 desktop_type = browser->host_desktop_type(); | |
| 167 | |
| 168 profiles::FindOrCreateNewWindowForProfile( | 162 profiles::FindOrCreateNewWindowForProfile( |
| 169 profile, | 163 profile, chrome::startup::IS_PROCESS_STARTUP, |
| 170 chrome::startup::IS_PROCESS_STARTUP, | 164 chrome::startup::IS_FIRST_RUN, false); |
| 171 chrome::startup::IS_FIRST_RUN, | |
| 172 desktop_type, | |
| 173 false); | |
| 174 } | 165 } |
| 175 | 166 |
| 176 } // namespace options | 167 } // namespace options |
| OLD | NEW |