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

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

Issue 998513002: Revert of Remove OneClickSigninHelper since it is no longer used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocl
Patch Set: Created 5 years, 9 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 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_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 Browser* GetDesktopBrowser(); 32 Browser* GetDesktopBrowser();
33 void SyncStarterCallback(OneClickSigninSyncStarter::SyncSetupResult result); 33 void SyncStarterCallback(OneClickSigninSyncStarter::SyncSetupResult result);
34 // Closes the current tab and shows the account management view of the avatar 34 // Closes the current tab and shows the account management view of the avatar
35 // bubble if |show_account_management| is true. 35 // bubble if |show_account_management| is true.
36 void CloseTab(bool show_account_management); 36 void CloseTab(bool show_account_management);
37 void HandleLoginError(const std::string& error_msg); 37 void HandleLoginError(const std::string& error_msg);
38 38
39 private: 39 private:
40 friend class InlineLoginUIBrowserTest;
41 FRIEND_TEST_ALL_PREFIXES(InlineLoginUIBrowserTest, CanOfferNoProfile);
42 FRIEND_TEST_ALL_PREFIXES(InlineLoginUIBrowserTest, CanOffer);
43 FRIEND_TEST_ALL_PREFIXES(InlineLoginUIBrowserTest, CanOfferProfileConnected);
44 FRIEND_TEST_ALL_PREFIXES(InlineLoginUIBrowserTest,
45 CanOfferUsernameNotAllowed);
46 FRIEND_TEST_ALL_PREFIXES(InlineLoginUIBrowserTest, CanOfferWithRejectedEmail);
47 FRIEND_TEST_ALL_PREFIXES(InlineLoginUIBrowserTest, CanOfferNoSigninCookies);
48
49 // Argument to CanOffer().
50 enum CanOfferFor {
51 CAN_OFFER_FOR_ALL,
52 CAN_OFFER_FOR_SECONDARY_ACCOUNT
53 };
54
55 static bool CanOffer(Profile* profile,
56 CanOfferFor can_offer_for,
57 const std::string& email,
58 std::string* error_message);
59
60 // InlineLoginHandler overrides: 40 // InlineLoginHandler overrides:
61 void SetExtraInitParams(base::DictionaryValue& params) override; 41 void SetExtraInitParams(base::DictionaryValue& params) override;
62 void CompleteLogin(const base::ListValue* args) override; 42 void CompleteLogin(const base::ListValue* args) override;
63 43
64 // Overridden from content::WebContentsObserver overrides. 44 // Overridden from content::WebContentsObserver overrides.
65 void DidCommitProvisionalLoadForFrame( 45 void DidCommitProvisionalLoadForFrame(
66 content::RenderFrameHost* render_frame_host, 46 content::RenderFrameHost* render_frame_host,
67 const GURL& url, 47 const GURL& url,
68 ui::PageTransition transition_type) override; 48 ui::PageTransition transition_type) override;
69 49
70 // True if the user has navigated to untrusted domains during the signin 50 // True if the user has navigated to untrusted domains during the signin
71 // process. 51 // process.
72 bool confirm_untrusted_signin_; 52 bool confirm_untrusted_signin_;
73 53
74 base::WeakPtrFactory<InlineLoginHandlerImpl> weak_factory_; 54 base::WeakPtrFactory<InlineLoginHandlerImpl> weak_factory_;
75 55
76 DISALLOW_COPY_AND_ASSIGN(InlineLoginHandlerImpl); 56 DISALLOW_COPY_AND_ASSIGN(InlineLoginHandlerImpl);
77 }; 57 };
78 58
79 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_ 59 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_INLINE_LOGIN_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698