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

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

Issue 18615010: Refactor utility methods out of the ProfileManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unbreak rebase and added new static fn from trunk Created 7 years, 5 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
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/ui/webui/options/managed_user_create_confirm_handler.h" 5 #include "chrome/browser/ui/webui/options/managed_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/value_conversions.h" 9 #include "base/value_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/profiles/profile_window.h"
14 #include "chrome/browser/signin/signin_manager.h" 15 #include "chrome/browser/signin/signin_manager.h"
15 #include "chrome/browser/signin/signin_manager_base.h" 16 #include "chrome/browser/signin/signin_manager_base.h"
16 #include "chrome/browser/signin/signin_manager_factory.h" 17 #include "chrome/browser/signin/signin_manager_factory.h"
17 #include "chrome/browser/ui/browser_finder.h" 18 #include "chrome/browser/ui/browser_finder.h"
18 #include "chrome/browser/ui/host_desktop.h" 19 #include "chrome/browser/ui/host_desktop.h"
19 #include "chrome/browser/ui/startup/startup_types.h" 20 #include "chrome/browser/ui/startup/startup_types.h"
20 #include "content/public/browser/web_ui.h" 21 #include "content/public/browser/web_ui.h"
21 #include "grit/generated_resources.h" 22 #include "grit/generated_resources.h"
22 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
23 24
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 Profile* profile = g_browser_process->profile_manager()-> 73 Profile* profile = g_browser_process->profile_manager()->
73 GetProfileByPath(profile_file_path); 74 GetProfileByPath(profile_file_path);
74 DCHECK(profile); 75 DCHECK(profile);
75 76
76 Browser* browser = 77 Browser* browser =
77 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); 78 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents());
78 chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; 79 chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
79 if (browser) 80 if (browser)
80 desktop_type = browser->host_desktop_type(); 81 desktop_type = browser->host_desktop_type();
81 82
82 ProfileManager::FindOrCreateNewWindowForProfile( 83 profiles::FindOrCreateNewWindowForProfile(
83 profile, 84 profile,
84 chrome::startup::IS_PROCESS_STARTUP, 85 chrome::startup::IS_PROCESS_STARTUP,
85 chrome::startup::IS_FIRST_RUN, 86 chrome::startup::IS_FIRST_RUN,
86 desktop_type, 87 desktop_type,
87 false); 88 false);
88 } 89 }
89 90
90 } // namespace options 91 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698