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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (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 #include "chrome/browser/ui/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 static void AskForConfirmation(content::WebContents* contents, 110 static void AskForConfirmation(content::WebContents* contents,
111 const std::string& last_email, 111 const std::string& last_email,
112 const std::string& email, 112 const std::string& email,
113 Callback callback); 113 Callback callback);
114 114
115 private: 115 private:
116 ConfirmEmailDialogDelegate(content::WebContents* contents, 116 ConfirmEmailDialogDelegate(content::WebContents* contents,
117 const std::string& last_email, 117 const std::string& last_email,
118 const std::string& email, 118 const std::string& email,
119 Callback callback); 119 Callback callback);
120 virtual ~ConfirmEmailDialogDelegate(); 120 ~ConfirmEmailDialogDelegate() override;
121 121
122 // TabModalConfirmDialogDelegate: 122 // TabModalConfirmDialogDelegate:
123 virtual base::string16 GetTitle() override; 123 base::string16 GetTitle() override;
124 virtual base::string16 GetDialogMessage() override; 124 base::string16 GetDialogMessage() override;
125 virtual base::string16 GetAcceptButtonTitle() override; 125 base::string16 GetAcceptButtonTitle() override;
126 virtual base::string16 GetCancelButtonTitle() override; 126 base::string16 GetCancelButtonTitle() override;
127 virtual base::string16 GetLinkText() const override; 127 base::string16 GetLinkText() const override;
128 virtual void OnAccepted() override; 128 void OnAccepted() override;
129 virtual void OnCanceled() override; 129 void OnCanceled() override;
130 virtual void OnClosed() override; 130 void OnClosed() override;
131 virtual void OnLinkClicked(WindowOpenDisposition disposition) override; 131 void OnLinkClicked(WindowOpenDisposition disposition) override;
132 132
133 std::string last_email_; 133 std::string last_email_;
134 std::string email_; 134 std::string email_;
135 Callback callback_; 135 Callback callback_;
136 136
137 // Web contents from which the "Learn more" link should be opened. 137 // Web contents from which the "Learn more" link should be opened.
138 content::WebContents* web_contents_; 138 content::WebContents* web_contents_;
139 139
140 DISALLOW_COPY_AND_ASSIGN(ConfirmEmailDialogDelegate); 140 DISALLOW_COPY_AND_ASSIGN(ConfirmEmailDialogDelegate);
141 }; 141 };
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 // CurrentHistoryCleaner ------------------------------------------------------ 423 // CurrentHistoryCleaner ------------------------------------------------------
424 424
425 // Watch a webcontents and remove URL from the history once loading is complete. 425 // Watch a webcontents and remove URL from the history once loading is complete.
426 // We have to delay the cleaning until the new URL has finished loading because 426 // We have to delay the cleaning until the new URL has finished loading because
427 // we're not allowed to remove the last-loaded URL from the history. Objects 427 // we're not allowed to remove the last-loaded URL from the history. Objects
428 // of this type automatically self-destruct once they're finished their work. 428 // of this type automatically self-destruct once they're finished their work.
429 class CurrentHistoryCleaner : public content::WebContentsObserver { 429 class CurrentHistoryCleaner : public content::WebContentsObserver {
430 public: 430 public:
431 explicit CurrentHistoryCleaner(content::WebContents* contents); 431 explicit CurrentHistoryCleaner(content::WebContents* contents);
432 virtual ~CurrentHistoryCleaner(); 432 ~CurrentHistoryCleaner() override;
433 433
434 // content::WebContentsObserver: 434 // content::WebContentsObserver:
435 virtual void WebContentsDestroyed() override; 435 void WebContentsDestroyed() override;
436 virtual void DidCommitProvisionalLoadForFrame( 436 void DidCommitProvisionalLoadForFrame(
437 content::RenderFrameHost* render_frame_host, 437 content::RenderFrameHost* render_frame_host,
438 const GURL& url, 438 const GURL& url,
439 ui::PageTransition transition_type) override; 439 ui::PageTransition transition_type) override;
440 440
441 private: 441 private:
442 scoped_ptr<content::WebContents> contents_; 442 scoped_ptr<content::WebContents> contents_;
443 int history_index_to_remove_; 443 int history_index_to_remove_;
444 444
445 DISALLOW_COPY_AND_ASSIGN(CurrentHistoryCleaner); 445 DISALLOW_COPY_AND_ASSIGN(CurrentHistoryCleaner);
446 }; 446 };
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 // If the web contents is showing a blank page and not about to be closed, 1581 // If the web contents is showing a blank page and not about to be closed,
1582 // redirect to the NTP or apps page. 1582 // redirect to the NTP or apps page.
1583 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && 1583 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) &&
1584 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { 1584 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) {
1585 RedirectToNtpOrAppsPage( 1585 RedirectToNtpOrAppsPage(
1586 web_contents(), 1586 web_contents(),
1587 signin::GetSourceForPromoURL(original_continue_url_)); 1587 signin::GetSourceForPromoURL(original_continue_url_));
1588 } 1588 }
1589 } 1589 }
1590 } 1590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698