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/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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 } | 539 } |
540 | 540 |
541 string16 OneClickInfoBarDelegateImpl::GetLinkText() const { | 541 string16 OneClickInfoBarDelegateImpl::GetLinkText() const { |
542 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 542 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
543 } | 543 } |
544 | 544 |
545 bool OneClickInfoBarDelegateImpl::LinkClicked( | 545 bool OneClickInfoBarDelegateImpl::LinkClicked( |
546 WindowOpenDisposition disposition) { | 546 WindowOpenDisposition disposition) { |
547 RecordHistogramAction(one_click_signin::HISTOGRAM_LEARN_MORE); | 547 RecordHistogramAction(one_click_signin::HISTOGRAM_LEARN_MORE); |
548 content::OpenURLParams params( | 548 content::OpenURLParams params( |
549 GURL(chrome::kChromeSyncLearnMoreURL), content::Referrer(), disposition, | 549 GURL(chrome::kChromeSyncLearnMoreURL), content::Referrer(), |
| 550 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
550 content::PAGE_TRANSITION_LINK, false); | 551 content::PAGE_TRANSITION_LINK, false); |
551 owner()->GetWebContents()->OpenURL(params); | 552 owner()->GetWebContents()->OpenURL(params); |
552 return false; | 553 return false; |
553 } | 554 } |
554 | 555 |
555 void OneClickInfoBarDelegateImpl::GetAlternateColors( | 556 void OneClickInfoBarDelegateImpl::GetAlternateColors( |
556 AlternateColors* alt_colors) { | 557 AlternateColors* alt_colors) { |
557 if (use_blue_on_white) { | 558 if (use_blue_on_white) { |
558 alt_colors->enabled = true; | 559 alt_colors->enabled = true; |
559 alt_colors->infobar_bottom_color = SK_ColorWHITE; | 560 alt_colors->infobar_bottom_color = SK_ColorWHITE; |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 | 1389 |
1389 void OneClickSigninHelper::SigninSuccess() { | 1390 void OneClickSigninHelper::SigninSuccess() { |
1390 RedirectOnSigninComplete(true); | 1391 RedirectOnSigninComplete(true); |
1391 } | 1392 } |
1392 | 1393 |
1393 void OneClickSigninHelper::RedirectOnSigninComplete(bool show_bubble) { | 1394 void OneClickSigninHelper::RedirectOnSigninComplete(bool show_bubble) { |
1394 // Show the result in the sign-in bubble if desired. | 1395 // Show the result in the sign-in bubble if desired. |
1395 RedirectToNtpOrAppsPage(show_bubble); | 1396 RedirectToNtpOrAppsPage(show_bubble); |
1396 signin_tracker_.reset(); | 1397 signin_tracker_.reset(); |
1397 } | 1398 } |
OLD | NEW |