| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 return self; | 61 return self; |
| 62 } | 62 } |
| 63 | 63 |
| 64 - (void)viewWillClose { | 64 - (void)viewWillClose { |
| 65 // This is usually called after a click handler has initiated sync | 65 // This is usually called after a click handler has initiated sync |
| 66 // and has reset the callback. However, in the case that we are closing | 66 // and has reset the callback. However, in the case that we are closing |
| 67 // the window and nothing else has initiated the sync, we must do so here | 67 // the window and nothing else has initiated the sync, we must do so here |
| 68 if (isSyncDialog_ && !startSyncCallback_.is_null()) { | 68 if (isSyncDialog_ && !startSyncCallback_.is_null()) { |
| 69 base::ResetAndReturn(&startSyncCallback_).Run( | 69 base::ResetAndReturn(&startSyncCallback_).Run( |
| 70 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); | 70 OneClickSigninSyncStarter::UNDO_SYNC); |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 - (IBAction)ok:(id)sender { | 74 - (IBAction)ok:(id)sender { |
| 75 if (isSyncDialog_) { | 75 if (isSyncDialog_) { |
| 76 OneClickSigninHelper::LogConfirmHistogramValue( | 76 OneClickSigninHelper::LogConfirmHistogramValue( |
| 77 clickedLearnMore_ ? | 77 clickedLearnMore_ ? |
| 78 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE_OK : | 78 one_click_signin::HISTOGRAM_CONFIRM_LEARN_MORE_OK : |
| 79 one_click_signin::HISTOGRAM_CONFIRM_OK); | 79 one_click_signin::HISTOGRAM_CONFIRM_OK); |
| 80 | 80 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 content::PAGE_TRANSITION_LINK, false); | 258 content::PAGE_TRANSITION_LINK, false); |
| 259 webContents_->OpenURL(params); | 259 webContents_->OpenURL(params); |
| 260 return YES; | 260 return YES; |
| 261 } | 261 } |
| 262 | 262 |
| 263 - (void)close { | 263 - (void)close { |
| 264 base::ResetAndReturn(&closeCallback_).Run(); | 264 base::ResetAndReturn(&closeCallback_).Run(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 @end | 267 @end |
| OLD | NEW |