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