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

Side by Side Diff: chrome/browser/ui/webui/options/sync_setup_handler.h

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
11 #include "chrome/browser/sync/sync_startup_tracker.h" 11 #include "chrome/browser/sync/sync_startup_tracker.h"
12 #include "chrome/browser/ui/webui/options/options_ui.h" 12 #include "chrome/browser/ui/webui/options/options_ui.h"
13 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 13 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
14 #include "components/signin/core/browser/signin_metrics.h"
14 15
15 class LoginUIService; 16 class LoginUIService;
16 class ProfileSyncService; 17 class ProfileSyncService;
17 class SigninManagerBase; 18 class SigninManagerBase;
18 19
19 namespace content { 20 namespace content {
20 class WebContents; 21 class WebContents;
21 } 22 }
22 23
23 class SyncSetupHandler : public options::OptionsPageUIHandler, 24 class SyncSetupHandler : public options::OptionsPageUIHandler,
(...skipping 13 matching lines...) Expand all
37 38
38 // LoginUIService::LoginUI implementation. 39 // LoginUIService::LoginUI implementation.
39 void FocusUI() override; 40 void FocusUI() override;
40 void CloseUI() override; 41 void CloseUI() override;
41 42
42 static void GetStaticLocalizedValues( 43 static void GetStaticLocalizedValues(
43 base::DictionaryValue* localized_strings, 44 base::DictionaryValue* localized_strings,
44 content::WebUI* web_ui); 45 content::WebUI* web_ui);
45 46
46 // Initializes the sync setup flow and shows the setup UI. 47 // Initializes the sync setup flow and shows the setup UI.
47 void OpenSyncSetup(); 48 void OpenSyncSetup(const base::ListValue* args);
48 49
49 // Shows advanced configuration dialog without going through sign in dialog. 50 // Shows advanced configuration dialog without going through sign in dialog.
50 // Kicks the sync backend if necessary with showing spinner dialog until it 51 // Kicks the sync backend if necessary with showing spinner dialog until it
51 // gets ready. 52 // gets ready.
52 void OpenConfigureSync(); 53 void OpenConfigureSync();
53 54
54 // Terminates the sync setup flow. 55 // Terminates the sync setup flow.
55 void CloseSyncSetup(); 56 void CloseSyncSetup();
56 57
57 protected: 58 protected:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void HandleConfigure(const base::ListValue* args); 99 void HandleConfigure(const base::ListValue* args);
99 void HandlePassphraseEntry(const base::ListValue* args); 100 void HandlePassphraseEntry(const base::ListValue* args);
100 void HandlePassphraseCancel(const base::ListValue* args); 101 void HandlePassphraseCancel(const base::ListValue* args);
101 void HandleShowSetupUI(const base::ListValue* args); 102 void HandleShowSetupUI(const base::ListValue* args);
102 void HandleDoSignOutOnAuthError(const base::ListValue* args); 103 void HandleDoSignOutOnAuthError(const base::ListValue* args);
103 void HandleStartSignin(const base::ListValue* args); 104 void HandleStartSignin(const base::ListValue* args);
104 void HandleStopSyncing(const base::ListValue* args); 105 void HandleStopSyncing(const base::ListValue* args);
105 void HandleCloseTimeout(const base::ListValue* args); 106 void HandleCloseTimeout(const base::ListValue* args);
106 #if !defined(OS_CHROMEOS) 107 #if !defined(OS_CHROMEOS)
107 // Displays the GAIA login form. 108 // Displays the GAIA login form.
108 void DisplayGaiaLogin(); 109 void DisplayGaiaLogin(signin_metrics::AccessPoint access_point);
109 110
110 // When web-flow is enabled, displays the Gaia login form in a new tab. 111 // When web-flow is enabled, displays the Gaia login form in a new tab.
111 // This function is virtual so that tests can override. 112 // This function is virtual so that tests can override.
112 virtual void DisplayGaiaLoginInNewTabOrWindow(); 113 virtual void DisplayGaiaLoginInNewTabOrWindow(
114 signin_metrics::AccessPoint access_point);
113 #endif 115 #endif
114 116
115 // Helper routine that gets the Profile associated with this object (virtual 117 // Helper routine that gets the Profile associated with this object (virtual
116 // so tests can override). 118 // so tests can override).
117 virtual Profile* GetProfile() const; 119 virtual Profile* GetProfile() const;
118 120
119 // A utility function to call before actually showing setup dialog. Makes sure 121 // A utility function to call before actually showing setup dialog. Makes sure
120 // that a new dialog can be shown and sets flag that setup is in progress. 122 // that a new dialog can be shown and sets flag that setup is in progress.
121 bool PrepareSyncSetup(); 123 bool PrepareSyncSetup();
122 124
(...skipping 28 matching lines...) Expand all
151 bool configuring_sync_; 153 bool configuring_sync_;
152 154
153 // The OneShotTimer object used to timeout of starting the sync backend 155 // The OneShotTimer object used to timeout of starting the sync backend
154 // service. 156 // service.
155 scoped_ptr<base::OneShotTimer> backend_start_timer_; 157 scoped_ptr<base::OneShotTimer> backend_start_timer_;
156 158
157 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); 159 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
158 }; 160 };
159 161
160 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ 162 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698