| 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 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h" | 5 #import "chrome/browser/ui/cocoa/one_click_signin_view_controller.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/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #import "chrome/browser/ui/chrome_style.h" | 10 #import "chrome/browser/ui/chrome_style.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 clickedLearnMore_ ? | 108 clickedLearnMore_ ? |
| 109 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE_ADVANCED : | 109 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE_ADVANCED : |
| 110 one_click_signin::HISTOGRAM_CONFIRM_ADVANCED); | 110 one_click_signin::HISTOGRAM_CONFIRM_ADVANCED); |
| 111 | 111 |
| 112 base::ResetAndReturn(&startSyncCallback_).Run( | 112 base::ResetAndReturn(&startSyncCallback_).Run( |
| 113 OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST); | 113 OneClickSigninSyncStarter::CONFIGURE_SYNC_FIRST); |
| 114 } | 114 } |
| 115 else { | 115 else { |
| 116 content::OpenURLParams params(GURL(chrome::kChromeUISettingsURL), | 116 content::OpenURLParams params(GURL(chrome::kChromeUISettingsURL), |
| 117 content::Referrer(), CURRENT_TAB, | 117 content::Referrer(), CURRENT_TAB, |
| 118 content::PAGE_TRANSITION_LINK, false); | 118 ui::PAGE_TRANSITION_LINK, false); |
| 119 webContents_->OpenURL(params); | 119 webContents_->OpenURL(params); |
| 120 } | 120 } |
| 121 [self close]; | 121 [self close]; |
| 122 } | 122 } |
| 123 | 123 |
| 124 - (IBAction)onClickClose:(id)sender { | 124 - (IBAction)onClickClose:(id)sender { |
| 125 if (isSyncDialog_) { | 125 if (isSyncDialog_) { |
| 126 OneClickSigninHelper::LogConfirmHistogramValue( | 126 OneClickSigninHelper::LogConfirmHistogramValue( |
| 127 clickedLearnMore_ ? | 127 clickedLearnMore_ ? |
| 128 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE_CLOSE : | 128 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE_CLOSE : |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 if (isSyncDialog_ && !clickedLearnMore_) { | 285 if (isSyncDialog_ && !clickedLearnMore_) { |
| 286 clickedLearnMore_ = YES; | 286 clickedLearnMore_ = YES; |
| 287 | 287 |
| 288 OneClickSigninHelper::LogConfirmHistogramValue( | 288 OneClickSigninHelper::LogConfirmHistogramValue( |
| 289 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE); | 289 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE); |
| 290 } | 290 } |
| 291 WindowOpenDisposition location = isSyncDialog_ ? | 291 WindowOpenDisposition location = isSyncDialog_ ? |
| 292 NEW_WINDOW : NEW_FOREGROUND_TAB; | 292 NEW_WINDOW : NEW_FOREGROUND_TAB; |
| 293 content::OpenURLParams params(GURL(chrome::kChromeSyncLearnMoreURL), | 293 content::OpenURLParams params(GURL(chrome::kChromeSyncLearnMoreURL), |
| 294 content::Referrer(), location, | 294 content::Referrer(), location, |
| 295 content::PAGE_TRANSITION_LINK, false); | 295 ui::PAGE_TRANSITION_LINK, false); |
| 296 webContents_->OpenURL(params); | 296 webContents_->OpenURL(params); |
| 297 return YES; | 297 return YES; |
| 298 } | 298 } |
| 299 | 299 |
| 300 - (void)close { | 300 - (void)close { |
| 301 base::ResetAndReturn(&closeCallback_).Run(); | 301 base::ResetAndReturn(&closeCallback_).Run(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 @end | 304 @end |
| OLD | NEW |