Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: chrome/browser/ui/cocoa/first_run_dialog.mm

Issue 10453041: Support for interactive set-chrome-as-default in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the reviewer's remark. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 @synthesize statsEnabled = statsEnabled_; 153 @synthesize statsEnabled = statsEnabled_;
154 @synthesize makeDefaultBrowser = makeDefaultBrowser_; 154 @synthesize makeDefaultBrowser = makeDefaultBrowser_;
155 155
156 - (id)init { 156 - (id)init {
157 NSString* nibpath = 157 NSString* nibpath =
158 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" 158 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog"
159 ofType:@"nib"]; 159 ofType:@"nib"];
160 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { 160 if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
161 // Bound to the dialog checkboxes. 161 // Bound to the dialog checkboxes.
162 makeDefaultBrowser_ = ShellIntegration::CanSetAsDefaultBrowser(); 162 makeDefaultBrowser_ = ShellIntegration::CanSetAsDefaultBrowser() !=
163 ShellIntegration::SET_DEFAULT_NOT_ALLOWED;
163 statsEnabled_ = StatsCheckboxDefault(); 164 statsEnabled_ = StatsCheckboxDefault();
164 } 165 }
165 return self; 166 return self;
166 } 167 }
167 168
168 - (void)dealloc { 169 - (void)dealloc {
169 [super dealloc]; 170 [super dealloc];
170 } 171 }
171 172
172 - (IBAction)showWindow:(id)sender { 173 - (IBAction)showWindow:(id)sender {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 [NSApp stopModal]; 286 [NSApp stopModal];
286 } 287 }
287 288
288 - (IBAction)learnMore:(id)sender { 289 - (IBAction)learnMore:(id)sender {
289 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); 290 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL);
290 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; 291 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr];
291 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; 292 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
292 } 293 }
293 294
294 @end 295 @end
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/startup/default_browser_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698