Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/views/sync/one_click_signin_bubble_view.h" | 5 #include "chrome/browser/ui/views/sync/one_click_signin_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 13 #include "content/public/browser/web_contents.h" | |
| 13 #include "grit/chromium_strings.h" | 14 #include "grit/chromium_strings.h" |
| 14 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "grit/theme_resources.h" | |
| 17 #include "grit/ui_resources.h" | |
| 15 #include "ui/base/keycodes/keyboard_codes.h" | 18 #include "ui/base/keycodes/keyboard_codes.h" |
| 16 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/views/controls/button/image_button.h" | |
| 18 #include "ui/views/controls/button/text_button.h" | 22 #include "ui/views/controls/button/text_button.h" |
| 23 #include "ui/views/controls/image_view.h" | |
| 19 #include "ui/views/controls/label.h" | 24 #include "ui/views/controls/label.h" |
| 20 #include "ui/views/controls/link.h" | 25 #include "ui/views/controls/link.h" |
| 21 #include "ui/views/layout/grid_layout.h" | 26 #include "ui/views/layout/grid_layout.h" |
| 22 #include "ui/views/layout/layout_constants.h" | 27 #include "ui/views/layout/layout_constants.h" |
| 23 #include "ui/views/widget/widget.h" | 28 #include "ui/views/widget/widget.h" |
| 24 | 29 |
| 25 // Minimum width for the mutli-line label. | 30 // Minimum width for the mutli-line label. |
| 26 const int kMinimumLabelWidth = 240; | 31 const int kMinimumLabelWidth = 240; |
| 32 const int kDialogMargin = 16; | |
| 33 | |
| 34 namespace { | |
| 35 | |
| 36 // The column set constants that can be used in the InitContent() function | |
| 37 // to layout views. | |
| 38 enum { | |
|
sky
2013/01/24 17:28:00
Name your enum.
Roger Tawa OOO till Jul 10th
2013/01/24 23:30:10
Done.
| |
| 39 kColumnSetFillAlign, | |
|
sky
2013/01/24 17:28:00
chrome uses ALL_CAPS for enums.
Roger Tawa OOO till Jul 10th
2013/01/24 23:30:10
Done.
| |
| 40 kColumnSetControls, | |
| 41 kColumnSetTitleBar, | |
| 42 kColumnSetDescription | |
| 43 }; | |
| 44 | |
| 45 class OneClickSigninDialogView : public OneClickSigninBubbleView { | |
| 46 public: | |
| 47 | |
|
sky
2013/01/24 17:28:00
remove newline.
Roger Tawa OOO till Jul 10th
2013/01/24 23:30:10
Done.
| |
| 48 OneClickSigninDialogView( | |
| 49 content::WebContents* web_content, | |
| 50 views::View* anchor_view, | |
| 51 const BrowserWindow::StartSyncCallback& start_sync_callback); | |
| 52 | |
| 53 private: | |
| 54 // Overridden from views::WidgetDelegate: | |
| 55 virtual ui::ModalType GetModalType() const OVERRIDE; | |
| 56 | |
| 57 // Overridden from OneClickSigninBubbleView: | |
| 58 virtual void InitContent(views::GridLayout* layout) OVERRIDE; | |
|
sky
2013/01/24 17:28:00
I'm surprised this works. Shouldn't virtual method
Roger Tawa OOO till Jul 10th
2013/01/24 23:30:10
No. This is common to allow behaviour to be overr
sky
2013/01/25 00:51:31
I've seen this in subclasses, but never in the par
| |
| 59 virtual void GetButtons(views::TextButton** ok_button, | |
| 60 views::TextButton** undo_button) OVERRIDE; | |
| 61 | |
| 62 // Overridden from views::LinkListener: | |
| 63 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | |
| 64 | |
| 65 content::WebContents* web_content_; | |
| 66 views::Link* learn_more_link_; | |
| 67 views::ImageButton* close_button_; | |
| 68 | |
| 69 DISALLOW_COPY_AND_ASSIGN(OneClickSigninDialogView); | |
| 70 }; | |
| 71 | |
| 72 OneClickSigninDialogView::OneClickSigninDialogView( | |
| 73 content::WebContents* web_content, | |
| 74 views::View* anchor_view, | |
| 75 const BrowserWindow::StartSyncCallback& start_sync_callback) | |
| 76 : OneClickSigninBubbleView(anchor_view, start_sync_callback), | |
| 77 web_content_(web_content), | |
| 78 learn_more_link_(NULL), | |
| 79 close_button_(NULL) { | |
| 80 set_arrow_location(views::BubbleBorder::NONE); | |
| 81 set_anchor_insets(gfx::Insets(0, 0, anchor_view->height() / 2, 0)); | |
| 82 set_close_on_deactivate(false); | |
| 83 set_margins(gfx::Insets(kDialogMargin, kDialogMargin, kDialogMargin, | |
| 84 kDialogMargin)); | |
| 85 } | |
| 86 | |
| 87 ui::ModalType OneClickSigninDialogView::GetModalType() const { | |
| 88 return ui::MODAL_TYPE_CHILD; | |
| 89 } | |
| 90 | |
| 91 void OneClickSigninDialogView::InitContent(views::GridLayout* layout) { | |
| 92 // Column set for title bar. | |
| 93 views::ColumnSet* cs = layout->AddColumnSet(kColumnSetTitleBar); | |
| 94 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0, | |
| 95 views::GridLayout::USE_PREF, 0, 0); | |
| 96 cs->AddPaddingColumn(1, views::kUnrelatedControlHorizontalSpacing); | |
| 97 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, 0, | |
| 98 views::GridLayout::USE_PREF, 0, 0); | |
| 99 | |
| 100 // Column set for descriptive text and link. | |
| 101 cs = layout->AddColumnSet(kColumnSetDescription); | |
| 102 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0, | |
| 103 views::GridLayout::USE_PREF, 0, 0); | |
| 104 cs->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing); | |
| 105 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0, | |
| 106 views::GridLayout::USE_PREF, 0, 0); | |
| 107 | |
| 108 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | |
| 109 | |
| 110 { | |
| 111 layout->StartRow(0, kColumnSetTitleBar); | |
| 112 | |
| 113 views::Label* label = new views::Label( | |
| 114 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_TITLE)); | |
| 115 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | |
| 116 label->SetFont(label->font().DeriveFont(3, gfx::Font::BOLD)); | |
| 117 layout->AddView(label); | |
| 118 | |
| 119 close_button_ = new views::ImageButton(this); | |
| 120 close_button_->SetImage(views::ImageButton::STATE_NORMAL, | |
| 121 rb.GetImageNamed(IDR_CLOSE_BAR).ToImageSkia()); | |
| 122 close_button_->SetImage(views::ImageButton::STATE_HOVERED, | |
| 123 rb.GetImageNamed(IDR_CLOSE_BAR_H).ToImageSkia()); | |
| 124 close_button_->SetImage(views::ImageButton::STATE_PRESSED, | |
| 125 rb.GetImageNamed(IDR_CLOSE_BAR_P).ToImageSkia()); | |
| 126 layout->AddView(close_button_); | |
| 127 } | |
| 128 | |
| 129 { | |
| 130 layout->StartRow(0, kColumnSetFillAlign); | |
| 131 | |
| 132 views::ImageView* image = new views::ImageView(); | |
| 133 image->SetImage(rb.GetImageNamed(IDR_ONE_CLICK_SIGNIN).ToImageSkia()); | |
| 134 layout->AddView(image); | |
| 135 } | |
| 136 | |
| 137 { | |
| 138 layout->StartRow(0, kColumnSetDescription); | |
| 139 | |
| 140 views::Label* label = new views::Label( | |
| 141 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_MESSAGE)); | |
| 142 layout->AddView(label); | |
| 143 | |
| 144 learn_more_link_ = new views::Link( | |
| 145 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); | |
| 146 learn_more_link_->set_listener(this); | |
| 147 learn_more_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | |
| 148 layout->AddView(learn_more_link_); | |
| 149 } | |
| 150 | |
| 151 layout->AddPaddingRow(0, views::kLabelToControlVerticalSpacing); | |
| 152 } | |
| 153 | |
| 154 void OneClickSigninDialogView::GetButtons(views::TextButton** ok_button, | |
| 155 views::TextButton** undo_button) { | |
| 156 *ok_button = new views::NativeTextButton(this); | |
| 157 *undo_button = new views::NativeTextButton(this); | |
| 158 | |
| 159 // The default size of the buttons is too large. To allow them to be smaller | |
| 160 // ignore the minimum default size. Furthermore, to make sure they are the | |
| 161 // same size, SetText() is called with both strings on both buttons. | |
| 162 string16 ok_label = | |
| 163 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_OK_BUTTON); | |
| 164 string16 undo_label = | |
| 165 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_UNDO_BUTTON); | |
| 166 (*ok_button)->SetText(undo_label); | |
| 167 (*ok_button)->SetText(ok_label); | |
| 168 (*undo_button)->SetText(ok_label); | |
| 169 (*undo_button)->SetText(undo_label); | |
| 170 } | |
| 171 | |
| 172 void OneClickSigninDialogView::LinkClicked(views::Link* source, | |
| 173 int event_flags) { | |
| 174 if (source == learn_more_link_) { | |
| 175 StartFade(false); | |
| 176 content::OpenURLParams params( | |
| 177 GURL(chrome::kChromeSyncLearnMoreURL), content::Referrer(), | |
| 178 NEW_WINDOW, content::PAGE_TRANSITION_LINK, false); | |
| 179 web_content_->OpenURL(params); | |
| 180 return; | |
| 181 } | |
| 182 | |
| 183 OneClickSigninBubbleView::LinkClicked(source, event_flags); | |
| 184 } | |
| 185 | |
| 186 } | |
|
sky
2013/01/24 17:28:00
// namespace
Roger Tawa OOO till Jul 10th
2013/01/24 23:30:10
Done.
| |
| 27 | 187 |
| 28 // OneClickSigninBubbleView ---------------------------------------------------- | 188 // OneClickSigninBubbleView ---------------------------------------------------- |
| 29 | 189 |
| 30 // static | 190 // static |
| 31 OneClickSigninBubbleView* OneClickSigninBubbleView::bubble_view_ = NULL; | 191 OneClickSigninBubbleView* OneClickSigninBubbleView::bubble_view_ = NULL; |
| 32 | 192 |
| 33 // static | 193 // static |
| 34 void OneClickSigninBubbleView::ShowBubble( | 194 void OneClickSigninBubbleView::ShowBubble( |
| 35 views::View* anchor_view, | 195 BrowserWindow::OneClickSigninBubbleType type, |
| 196 ToolbarView* toolbar_view, | |
| 36 const BrowserWindow::StartSyncCallback& start_sync) { | 197 const BrowserWindow::StartSyncCallback& start_sync) { |
| 37 if (IsShowing()) | 198 if (IsShowing()) |
| 38 return; | 199 return; |
| 39 | 200 |
| 40 bubble_view_ = | 201 bubble_view_ = type == BrowserWindow::ONE_CLICK_SIGNIN_BUBBLE_TYPE_BUBBLE ? |
| 41 new OneClickSigninBubbleView(anchor_view, start_sync); | 202 new OneClickSigninBubbleView(toolbar_view->app_menu(), start_sync) : |
| 203 new OneClickSigninDialogView(toolbar_view->GetWebContents(), | |
| 204 toolbar_view->location_bar(), start_sync); | |
| 205 | |
| 42 views::BubbleDelegateView::CreateBubble(bubble_view_); | 206 views::BubbleDelegateView::CreateBubble(bubble_view_); |
| 43 bubble_view_->Show(); | 207 bubble_view_->Show(); |
| 44 } | 208 } |
| 45 | 209 |
| 46 // static | 210 // static |
| 47 bool OneClickSigninBubbleView::IsShowing() { | 211 bool OneClickSigninBubbleView::IsShowing() { |
| 48 return bubble_view_ != NULL; | 212 return bubble_view_ != NULL; |
| 49 } | 213 } |
| 50 | 214 |
| 51 // static | 215 // static |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 73 views::BubbleDelegateView::AnimationEnded(animation); | 237 views::BubbleDelegateView::AnimationEnded(animation); |
| 74 if (message_loop_for_testing_) | 238 if (message_loop_for_testing_) |
| 75 message_loop_for_testing_->Quit(); | 239 message_loop_for_testing_->Quit(); |
| 76 } | 240 } |
| 77 | 241 |
| 78 void OneClickSigninBubbleView::Init() { | 242 void OneClickSigninBubbleView::Init() { |
| 79 views::GridLayout* layout = new views::GridLayout(this); | 243 views::GridLayout* layout = new views::GridLayout(this); |
| 80 SetLayoutManager(layout); | 244 SetLayoutManager(layout); |
| 81 set_border(views::Border::CreateEmptyBorder(8, 8, 8, 8)); | 245 set_border(views::Border::CreateEmptyBorder(8, 8, 8, 8)); |
| 82 | 246 |
| 83 enum { | |
| 84 kColumnSetFillAlign, | |
| 85 kColumnSetControls | |
| 86 }; | |
| 87 | |
| 88 // Column set for descriptive text and link. | 247 // Column set for descriptive text and link. |
| 89 views::ColumnSet* cs = layout->AddColumnSet(kColumnSetFillAlign); | 248 views::ColumnSet* cs = layout->AddColumnSet(kColumnSetFillAlign); |
| 90 cs->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER, 0, | 249 cs->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER, 1, |
| 91 views::GridLayout::USE_PREF, 0, kMinimumLabelWidth); | 250 views::GridLayout::USE_PREF, 0, 0); |
| 92 | 251 |
| 252 // Column set for buttons at bottom of bubble. | |
| 93 cs = layout->AddColumnSet(kColumnSetControls); | 253 cs = layout->AddColumnSet(kColumnSetControls); |
| 94 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0, | 254 cs->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 0, |
| 95 views::GridLayout::USE_PREF, 0, 0); | 255 views::GridLayout::USE_PREF, 0, 0); |
| 96 cs->AddPaddingColumn(1, views::kUnrelatedControlHorizontalSpacing); | 256 cs->AddPaddingColumn(1, views::kUnrelatedControlHorizontalSpacing); |
| 97 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, 0, | 257 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, 0, |
| 98 views::GridLayout::USE_PREF, 0, 0); | 258 views::GridLayout::USE_PREF, 0, 0); |
| 99 cs->AddPaddingColumn(0, views::kRelatedButtonHSpacing); | 259 cs->AddPaddingColumn(0, views::kRelatedButtonHSpacing); |
| 100 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, 0, | 260 cs->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, 0, |
| 101 views::GridLayout::USE_PREF, 0, 0); | 261 views::GridLayout::USE_PREF, 0, 0); |
| 102 | 262 |
| 103 // Add main text description. | 263 InitContent(layout); |
| 104 views::Label* label = new views::Label( | |
| 105 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_BUBBLE_MESSAGE)); | |
| 106 label->SetMultiLine(true); | |
| 107 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | |
| 108 label->SizeToFit(kMinimumLabelWidth); | |
| 109 | |
| 110 layout->StartRow(0, kColumnSetFillAlign); | |
| 111 layout->AddView(label); | |
| 112 | 264 |
| 113 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing); | 265 layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing); |
| 114 | 266 |
| 115 // Add link for user to do advanced config of sync. | 267 // Add link for user to do advanced config of sync. |
| 116 advanced_link_= new views::Link( | 268 advanced_link_= new views::Link( |
| 117 l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_ADVANCED)); | 269 l10n_util::GetStringUTF16(IDS_SYNC_PROMO_NTP_BUBBLE_ADVANCED)); |
| 118 advanced_link_->set_listener(this); | 270 advanced_link_->set_listener(this); |
| 119 advanced_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 271 advanced_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 120 | 272 |
| 121 // Add controls at the bottom. | 273 // Add controls at the bottom. |
| 122 ok_button_ = new views::NativeTextButton(this); | 274 GetButtons(&ok_button_, &undo_button_); |
| 123 ok_button_->SetIsDefault(true); | 275 ok_button_->SetIsDefault(true); |
| 124 | 276 |
| 125 undo_button_ = new views::NativeTextButton(this); | |
| 126 | |
| 127 // The default size of the buttons is too large. To allow them to be smaller | |
| 128 // ignore the minimum default size. Furthermore, to make sure they are the | |
| 129 // same size, SetText() is called with both strings on both buttons. | |
| 130 ok_button_->set_ignore_minimum_size(true); | |
| 131 undo_button_->set_ignore_minimum_size(true); | |
| 132 string16 ok_label = l10n_util::GetStringUTF16(IDS_OK); | |
| 133 string16 undo_label = l10n_util::GetStringUTF16(IDS_ONE_CLICK_BUBBLE_UNDO); | |
| 134 ok_button_->SetText(undo_label); | |
| 135 ok_button_->SetText(ok_label); | |
| 136 undo_button_->SetText(ok_label); | |
| 137 undo_button_->SetText(undo_label); | |
| 138 | |
| 139 layout->StartRow(0, kColumnSetControls); | 277 layout->StartRow(0, kColumnSetControls); |
| 140 layout->AddView(advanced_link_); | 278 layout->AddView(advanced_link_); |
| 141 layout->AddView(ok_button_); | 279 layout->AddView(ok_button_); |
| 142 layout->AddView(undo_button_); | 280 layout->AddView(undo_button_); |
| 143 | 281 |
| 144 AddAccelerator(ui::Accelerator(ui::VKEY_RETURN, 0)); | 282 AddAccelerator(ui::Accelerator(ui::VKEY_RETURN, 0)); |
| 145 } | 283 } |
| 146 | 284 |
| 285 void OneClickSigninBubbleView::InitContent(views::GridLayout* layout) { | |
| 286 // Add main text description. | |
| 287 views::Label* label = new views::Label( | |
| 288 l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_BUBBLE_MESSAGE)); | |
| 289 label->SetMultiLine(true); | |
| 290 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | |
| 291 label->SizeToFit(kMinimumLabelWidth); | |
| 292 | |
| 293 layout->StartRow(0, kColumnSetFillAlign); | |
| 294 layout->AddView(label); | |
| 295 } | |
| 296 | |
| 297 void OneClickSigninBubbleView::GetButtons(views::TextButton** ok_button, | |
| 298 views::TextButton** undo_button) { | |
| 299 *ok_button = new views::NativeTextButton(this); | |
| 300 *undo_button = new views::NativeTextButton(this); | |
| 301 | |
| 302 // The default size of the buttons is too large. To allow them to be smaller | |
| 303 // ignore the minimum default size. Furthermore, to make sure they are the | |
| 304 // same size, SetText() is called with both strings on both buttons. | |
| 305 (*ok_button)->set_ignore_minimum_size(true); | |
| 306 (*undo_button)->set_ignore_minimum_size(true); | |
| 307 string16 ok_label = l10n_util::GetStringUTF16(IDS_OK); | |
| 308 string16 undo_label = l10n_util::GetStringUTF16(IDS_ONE_CLICK_BUBBLE_UNDO); | |
| 309 (*ok_button)->SetText(undo_label); | |
| 310 (*ok_button)->SetText(ok_label); | |
| 311 (*undo_button)->SetText(ok_label); | |
| 312 (*undo_button)->SetText(undo_label); | |
| 313 } | |
| 314 | |
| 147 void OneClickSigninBubbleView::WindowClosing() { | 315 void OneClickSigninBubbleView::WindowClosing() { |
| 148 // We have to reset |bubble_view_| here, not in our destructor, because | 316 // We have to reset |bubble_view_| here, not in our destructor, because |
| 149 // we'll be destroyed asynchronously and the shown state will be checked | 317 // we'll be destroyed asynchronously and the shown state will be checked |
| 150 // before then. | 318 // before then. |
| 151 DCHECK_EQ(bubble_view_, this); | 319 DCHECK_EQ(bubble_view_, this); |
| 152 bubble_view_ = NULL; | 320 bubble_view_ = NULL; |
| 153 | 321 |
| 154 if (!start_sync_callback_.is_null()) { | 322 if (!start_sync_callback_.is_null()) { |
| 155 base::ResetAndReturn(&start_sync_callback_).Run( | 323 base::ResetAndReturn(&start_sync_callback_).Run( |
| 156 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); | 324 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 185 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, | 353 void OneClickSigninBubbleView::ButtonPressed(views::Button* sender, |
| 186 const ui::Event& event) { | 354 const ui::Event& event) { |
| 187 StartFade(false); | 355 StartFade(false); |
| 188 if (ok_button_ == sender) { | 356 if (ok_button_ == sender) { |
| 189 base::ResetAndReturn(&start_sync_callback_).Run( | 357 base::ResetAndReturn(&start_sync_callback_).Run( |
| 190 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); | 358 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); |
| 191 } else { | 359 } else { |
| 192 start_sync_callback_.Reset(); | 360 start_sync_callback_.Reset(); |
| 193 } | 361 } |
| 194 } | 362 } |
| OLD | NEW |