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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_error_handler.h

Issue 2351173004: Display local signin error without browser and record the path of selected profile in user manager. (Closed)
Patch Set: cr Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SIGNIN_SIGNIN_ERROR_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_ERROR_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_ERROR_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_ERROR_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/public/browser/web_ui_message_handler.h" 11 #include "content/public/browser/web_ui_message_handler.h"
12 12
13 class Browser; 13 class Browser;
14 class ProfileAttributesEntry; 14 class ProfileAttributesEntry;
15 15
16 namespace base { 16 namespace base {
17 class ListValue; 17 class ListValue;
18 } 18 }
19 19
20 class SigninErrorHandler : public content::WebUIMessageHandler { 20 class SigninErrorHandler : public content::WebUIMessageHandler {
21 public: 21 public:
22 SigninErrorHandler() {} 22 explicit SigninErrorHandler(bool is_system_profile);
23
23 ~SigninErrorHandler() override {} 24 ~SigninErrorHandler() override {}
24 25
25 // content::WebUIMessageHandler: 26 // content::WebUIMessageHandler:
26 void RegisterMessages() override; 27 void RegisterMessages() override;
27 28
28 // Sets the existing profile entry that has the same username used for signin. 29 // Sets the existing profile entry that has the same username used for signin.
29 // This function is called when the signin error is a duplicate account error. 30 // This function is called when the signin error is a duplicate account error.
30 void set_duplicate_profile_entry( 31 void set_duplicate_profile_entry(
31 const ProfileAttributesEntry* duplicate_profile_entry) { 32 const ProfileAttributesEntry* duplicate_profile_entry) {
32 duplicate_profile_entry_ = duplicate_profile_entry; 33 duplicate_profile_entry_ = duplicate_profile_entry;
(...skipping 18 matching lines...) Expand all
51 // Handles the web ui message sent when the html content is done being laid 52 // Handles the web ui message sent when the html content is done being laid
52 // out and it's time to resize the native view hosting it to fit. |args| is 53 // out and it's time to resize the native view hosting it to fit. |args| is
53 // a single integer value for the height the native view should resize to. 54 // a single integer value for the height the native view should resize to.
54 virtual void HandleInitializedWithSize(const base::ListValue* args); 55 virtual void HandleInitializedWithSize(const base::ListValue* args);
55 56
56 void CloseDialog(); 57 void CloseDialog();
57 58
58 private: 59 private:
59 const ProfileAttributesEntry* duplicate_profile_entry_ = nullptr; 60 const ProfileAttributesEntry* duplicate_profile_entry_ = nullptr;
60 61
62 bool is_system_profile_;
63
61 DISALLOW_COPY_AND_ASSIGN(SigninErrorHandler); 64 DISALLOW_COPY_AND_ASSIGN(SigninErrorHandler);
62 }; 65 };
63 66
64 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_ERROR_HANDLER_H_ 67 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_SIGNIN_ERROR_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698