Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: chrome/browser/ui/webui/options/supervised_user_create_confirm_handler.cc

Issue 1686833003: Remove HostDesktopType from profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-16
Patch Set: desktop linux and mac Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698