Index: chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
diff --git a/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h b/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
index 53abb0f595f161520079331ebbc1a4ffcf69c7ec..7664321a539ab5e8a411e9ef1c1621c10aefa911 100644 |
--- a/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
+++ b/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
@@ -28,11 +28,11 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
public views::ButtonListener { |
public: |
// Show the one-click signin bubble if not already showing. The bubble |
- // will be placed visually beneath |anchor_view|. The |browser| is used |
- // to open links. |
+ // will be placed visually beneath |anchor_view|. The closures are called |
+ // to open the corresponding links, and the callback is used to start sync. |
+ // The bool argument indicates if default sync settings should be used. |
static void ShowBubble(views::View* anchor_view, |
- const base::Closure& learn_more_callback, |
- const base::Closure& advanced_callback); |
+ const base::Callback<void(bool)>& start_sync); |
static bool IsShowing(); |
@@ -43,18 +43,18 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
static OneClickSigninBubbleView* view_for_testing() { return bubble_view_; } |
// The following accessor message should only be used for testing. |
- views::Link* learn_more_link_for_testing() const { return learn_more_link_; } |
views::Link* advanced_link_for_testing() const { return advanced_link_; } |
- views::TextButton* close_button_for_testing() const { return close_button_; } |
+ views::TextButton* ok_button_for_testing() const { return ok_button_; } |
+ views::TextButton* undo_button_for_testing() const { return undo_button_; } |
void set_message_loop_for_testing(MessageLoop* loop) { |
message_loop_for_testing_ = loop; |
} |
private: |
// Creates a BookmarkBubbleView. |
- OneClickSigninBubbleView(views::View* anchor_view, |
- const base::Closure& learn_more_callback, |
- const base::Closure& advanced_callback); |
+ OneClickSigninBubbleView( |
+ views::View* anchor_view, |
+ const base::Callback<void(bool)>& start_sync_callback); |
virtual ~OneClickSigninBubbleView(); |
@@ -78,18 +78,15 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
// The bubble, if we're showing one. |
static OneClickSigninBubbleView* bubble_view_; |
- // Link to web page to learn more about sync. |
- views::Link* learn_more_link_; |
- |
// Link to sync setup advanced page. |
views::Link* advanced_link_; |
- // Button to close the window. |
- views::TextButton* close_button_; |
+ // Controls at buttom of bubble. |
+ views::TextButton* ok_button_; |
+ views::TextButton* undo_button_; |
- // The callbacks for the links. |
- base::Closure learn_more_callback_; |
- base::Closure advanced_callback_; |
+ base::Callback<void(bool)> start_sync_callback_; |
+ bool call_sync_callback_on_close_; |
// A message loop used only with unit tests. |
MessageLoop* message_loop_for_testing_; |