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

Side by Side Diff: chrome/browser/sync/sync_setup_flow.h

Issue 6364009: From the enter-passphrase screen in sync setup, canceling should only disable... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_SYNC_SYNC_SETUP_FLOW_H_ 5 #ifndef CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_
6 #define CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ 6 #define CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const std::string& password, 104 const std::string& password,
105 const std::string& captcha, 105 const std::string& captcha,
106 const std::string& access_code); 106 const std::string& access_code);
107 107
108 void OnUserConfigured(const SyncConfiguration& configuration); 108 void OnUserConfigured(const SyncConfiguration& configuration);
109 109
110 // The 'passphrase' screen is used when the user is prompted to enter 110 // The 'passphrase' screen is used when the user is prompted to enter
111 // an existing passphrase. 111 // an existing passphrase.
112 void OnPassphraseEntry(const std::string& passphrase); 112 void OnPassphraseEntry(const std::string& passphrase);
113 113
114 // The user canceled the passphrase entry without supplying a passphrase.
115 void OnPassphraseCancel();
116
114 // The 'first passphrase' screen is for users migrating from a build 117 // The 'first passphrase' screen is for users migrating from a build
115 // without passwords, who are prompted to make a passphrase choice. 118 // without passwords, who are prompted to make a passphrase choice.
116 void OnFirstPassphraseEntry(const std::string& option, 119 void OnFirstPassphraseEntry(const std::string& option,
117 const std::string& passphrase); 120 const std::string& passphrase);
118 121
119 void OnGoToDashboard(); 122 void OnGoToDashboard();
120 123
121 private: 124 private:
122 FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, InitialStepLogin); 125 FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, InitialStepLogin);
123 FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, ChooseDataTypesSetsPrefs); 126 FRIEND_TEST_ALL_PREFIXES(SyncSetupWizardTest, ChooseDataTypesSetsPrefs);
(...skipping 25 matching lines...) Expand all
149 SyncSetupWizard::State current_state_; 152 SyncSetupWizard::State current_state_;
150 SyncSetupWizard::State end_state_; // The goal. 153 SyncSetupWizard::State end_state_; // The goal.
151 154
152 // Time that the GAIA_LOGIN step was received. 155 // Time that the GAIA_LOGIN step was received.
153 base::TimeTicks login_start_time_; 156 base::TimeTicks login_start_time_;
154 157
155 // The handler needed for the entire flow. 158 // The handler needed for the entire flow.
156 FlowHandler* flow_handler_; 159 FlowHandler* flow_handler_;
157 mutable bool owns_flow_handler_; 160 mutable bool owns_flow_handler_;
158 161
159 // We need this to write the sentinel "setup completed" pref. 162 // We need this to propagate back all user settings changes.
160 ProfileSyncService* service_; 163 ProfileSyncService* service_;
161 164
162 // Currently used only on OS X 165 // Currently used only on OS X
163 // TODO(akalin): Add the necessary support to the other OSes and use 166 // TODO(akalin): Add the necessary support to the other OSes and use
164 // this for them. 167 // this for them.
165 gfx::NativeWindow html_dialog_window_; 168 gfx::NativeWindow html_dialog_window_;
166 169
167 DISALLOW_COPY_AND_ASSIGN(SyncSetupFlow); 170 DISALLOW_COPY_AND_ASSIGN(SyncSetupFlow);
168 }; 171 };
169 172
(...skipping 23 matching lines...) Expand all
193 FlowHandler() {} 196 FlowHandler() {}
194 virtual ~FlowHandler() {} 197 virtual ~FlowHandler() {}
195 198
196 // DOMMessageHandler implementation. 199 // DOMMessageHandler implementation.
197 virtual void RegisterMessages(); 200 virtual void RegisterMessages();
198 201
199 // Callbacks from the page. 202 // Callbacks from the page.
200 void HandleSubmitAuth(const ListValue* args); 203 void HandleSubmitAuth(const ListValue* args);
201 void HandleConfigure(const ListValue* args); 204 void HandleConfigure(const ListValue* args);
202 void HandlePassphraseEntry(const ListValue* args); 205 void HandlePassphraseEntry(const ListValue* args);
206 void HandlePassphraseCancel(const ListValue* args);
203 void HandleFirstPassphrase(const ListValue* args); 207 void HandleFirstPassphrase(const ListValue* args);
204 void HandleGoToDashboard(const ListValue* args); 208 void HandleGoToDashboard(const ListValue* args);
205 209
206 // These functions control which part of the HTML is visible. 210 // These functions control which part of the HTML is visible.
207 void ShowGaiaLogin(const DictionaryValue& args); 211 void ShowGaiaLogin(const DictionaryValue& args);
208 void ShowGaiaSuccessAndClose(); 212 void ShowGaiaSuccessAndClose();
209 void ShowGaiaSuccessAndSettingUp(); 213 void ShowGaiaSuccessAndSettingUp();
210 void ShowConfigure(const DictionaryValue& args); 214 void ShowConfigure(const DictionaryValue& args);
211 void ShowPassphraseEntry(const DictionaryValue& args); 215 void ShowPassphraseEntry(const DictionaryValue& args);
212 void ShowFirstPassphrase(const DictionaryValue& args); 216 void ShowFirstPassphrase(const DictionaryValue& args);
213 void ShowSettingUp(); 217 void ShowSettingUp();
214 void ShowSetupDone(const std::wstring& user); 218 void ShowSetupDone(const std::wstring& user);
215 void ShowFirstTimeDone(const std::wstring& user); 219 void ShowFirstTimeDone(const std::wstring& user);
216 220
217 void set_flow(SyncSetupFlow* flow) { 221 void set_flow(SyncSetupFlow* flow) {
218 flow_ = flow; 222 flow_ = flow;
219 } 223 }
220 224
221 private: 225 private:
222 void ExecuteJavascriptInIFrame(const std::wstring& iframe_xpath, 226 void ExecuteJavascriptInIFrame(const std::wstring& iframe_xpath,
223 const std::wstring& js); 227 const std::wstring& js);
224 SyncSetupFlow* flow_; 228 SyncSetupFlow* flow_;
225 DISALLOW_COPY_AND_ASSIGN(FlowHandler); 229 DISALLOW_COPY_AND_ASSIGN(FlowHandler);
226 }; 230 };
227 231
228 #endif // CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_ 232 #endif // CHROME_BROWSER_SYNC_SYNC_SETUP_FLOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698