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

Side by Side Diff: chrome/browser/profiles/profile_window.h

Issue 132453004: Add Profile metric counting to new User Manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more mac compilation fixes Created 6 years, 11 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "chrome/browser/profiles/profile_metrics.h"
9 #include "chrome/browser/ui/host_desktop.h" 10 #include "chrome/browser/ui/host_desktop.h"
10 #include "chrome/browser/ui/startup/startup_types.h" 11 #include "chrome/browser/ui/startup/startup_types.h"
11 12
12 class Profile; 13 class Profile;
13 namespace base { class FilePath; } 14 namespace base { class FilePath; }
14 15
15 namespace profiles { 16 namespace profiles {
16 17
17 // Callback to be used when switching to a new profile is completed. 18 // Callback to be used when switching to a new profile is completed.
18 typedef base::Callback<void()> ProfileSwitchingDoneCallback; 19 typedef base::Callback<void()> ProfileSwitchingDoneCallback;
(...skipping 13 matching lines...) Expand all
32 33
33 // Opens a Browser with the specified profile given by |path|. 34 // Opens a Browser with the specified profile given by |path|.
34 // If |always_create| is true then a new window is created 35 // If |always_create| is true then a new window is created
35 // even if a window for that profile already exists. When the browser is 36 // even if a window for that profile already exists. When the browser is
36 // opened, |callback| will be run if it isn't null. 37 // opened, |callback| will be run if it isn't null.
37 38
38 void SwitchToProfile( 39 void SwitchToProfile(
39 const base::FilePath& path, 40 const base::FilePath& path,
40 chrome::HostDesktopType desktop_type, 41 chrome::HostDesktopType desktop_type,
41 bool always_create, 42 bool always_create,
42 ProfileSwitchingDoneCallback callback); 43 ProfileSwitchingDoneCallback callback,
44 ProfileMetrics::ProfileOpen metric);
43 45
44 // Opens a Browser for the guest profile and runs |callback| if it isn't null. 46 // Opens a Browser for the guest profile and runs |callback| if it isn't null.
45 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type, 47 void SwitchToGuestProfile(chrome::HostDesktopType desktop_type,
46 ProfileSwitchingDoneCallback callback); 48 ProfileSwitchingDoneCallback callback);
47 49
48 // Creates a new profile from the next available profile directory, and 50 // Creates a new profile from the next available profile directory, and
49 // opens a new browser window for the profile once it is ready. When the browser 51 // opens a new browser window for the profile once it is ready. When the browser
50 // is opened, |callback| will be run if it isn't null. 52 // is opened, |callback| will be run if it isn't null.
51 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type, 53 void CreateAndSwitchToNewProfile(chrome::HostDesktopType desktop_type,
52 ProfileSwitchingDoneCallback callback); 54 ProfileSwitchingDoneCallback callback,
55 ProfileMetrics::ProfileAdd metric);
53 56
54 // Closes all browser windows that belong to the guest profile. 57 // Closes all browser windows that belong to the guest profile.
55 void CloseGuestProfileWindows(); 58 void CloseGuestProfileWindows();
56 59
57 // Closes all the browser windows for |profile| and opens the user manager. 60 // Closes all the browser windows for |profile| and opens the user manager.
58 void LockProfile(Profile* profile); 61 void LockProfile(Profile* profile);
59 62
60 } // namespace profiles 63 } // namespace profiles
61 64
62 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_ 65 #endif // CHROME_BROWSER_PROFILES_PROFILE_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698