| 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/first_run_dialog.h" | 5 #import "chrome/browser/ui/cocoa/first_run_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 @synthesize statsEnabled = statsEnabled_; | 133 @synthesize statsEnabled = statsEnabled_; |
| 134 @synthesize makeDefaultBrowser = makeDefaultBrowser_; | 134 @synthesize makeDefaultBrowser = makeDefaultBrowser_; |
| 135 | 135 |
| 136 - (id)init { | 136 - (id)init { |
| 137 NSString* nibpath = | 137 NSString* nibpath = |
| 138 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" | 138 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" |
| 139 ofType:@"nib"]; | 139 ofType:@"nib"]; |
| 140 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 140 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
| 141 // Bound to the dialog checkboxes. | 141 // Bound to the dialog checkboxes. |
| 142 makeDefaultBrowser_ = shell_integration::CanSetAsDefaultBrowser() != | 142 makeDefaultBrowser_ = shell_integration::CanSetAsDefaultBrowser(); |
| 143 shell_integration::SET_DEFAULT_NOT_ALLOWED; | |
| 144 statsEnabled_ = StatsCheckboxDefault(); | 143 statsEnabled_ = StatsCheckboxDefault(); |
| 145 } | 144 } |
| 146 return self; | 145 return self; |
| 147 } | 146 } |
| 148 | 147 |
| 149 - (void)dealloc { | 148 - (void)dealloc { |
| 150 [super dealloc]; | 149 [super dealloc]; |
| 151 } | 150 } |
| 152 | 151 |
| 153 - (IBAction)showWindow:(id)sender { | 152 - (IBAction)showWindow:(id)sender { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 [NSApp stopModal]; | 273 [NSApp stopModal]; |
| 275 } | 274 } |
| 276 | 275 |
| 277 - (IBAction)learnMore:(id)sender { | 276 - (IBAction)learnMore:(id)sender { |
| 278 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); | 277 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); |
| 279 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 278 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
| 280 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 279 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
| 281 } | 280 } |
| 282 | 281 |
| 283 @end | 282 @end |
| OLD | NEW |