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

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

Issue 165387: Fix several bugs in First Run. (Closed)
Patch Set: Created 11 years, 4 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/first_run_dialog.h" 5 #import "chrome/browser/cocoa/first_run_dialog.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #import "base/scoped_nsobject.h" 9 #import "base/scoped_nsobject.h"
10 10
11 @implementation FirstRunDialogController 11 @implementation FirstRunDialogController
12 12
13 @synthesize userDidCancel = user_did_cancel_; 13 @synthesize userDidCancel = user_did_cancel_;
14 @synthesize statsEnabled = stats_enabled_; 14 @synthesize statsEnabled = stats_enabled_;
15 @synthesize makeDefaultBrowser = make_default_browser_; 15 @synthesize makeDefaultBrowser = make_default_browser_;
16 @synthesize importBookmarks = import_bookmarks_; 16 @synthesize importBookmarks = import_bookmarks_;
17 @synthesize browserImportSelectedIndex = browser_import_selected_index_; 17 @synthesize browserImportSelectedIndex = browser_import_selected_index_;
18 @synthesize browserImportList = browser_import_list_; 18 @synthesize browserImportList = browser_import_list_;
19 19
20 - (id)init { 20 - (id)init {
21 self = [super initWithWindowNibName:@"FirstRunDialog"]; 21 self = [super initWithWindowNibName:@"FirstRunDialog"];
22 if (self != nil) { 22 if (self != nil) {
23 // Bound to the dialog checkbox, default to true. 23 // Bound to the dialog checkbox, default to true.
24 stats_enabled_ = YES; 24 stats_enabled_ = YES;
25 import_bookmarks_ = YES; 25 import_bookmarks_ = YES;
26
27 #if !defined(GOOGLE_CHROME_BUILD)
28 // In Chromium builds all stats reporting is disabled so there's no reason
29 // to display the checkbox - the setting is always OFF.
30 usage_stats_checkbox_hidden_ = YES;
31 #endif // !GOOGLE_CHROME_BUILD
26 } 32 }
27 return self; 33 return self;
28 } 34 }
29 35
30 - (void)dealloc { 36 - (void)dealloc {
31 [browser_import_list_ release]; 37 [browser_import_list_ release];
32 [super dealloc]; 38 [super dealloc];
33 } 39 }
34 40
35 - (IBAction)showWindow:(id)sender { 41 - (IBAction)showWindow:(id)sender {
(...skipping 25 matching lines...) Expand all
61 67
62 - (IBAction)learnMore:(id)sender { 68 - (IBAction)learnMore:(id)sender {
63 // TODO(jeremy): Rather than always using English, set the language that 69 // TODO(jeremy): Rather than always using English, set the language that
64 // Chrome is running in. 70 // Chrome is running in.
65 NSURL* learnMoreUrl = [NSURL URLWithString:@"http://www.google.com/support/" 71 NSURL* learnMoreUrl = [NSURL URLWithString:@"http://www.google.com/support/"
66 "chrome/bin/answer.py?answer=96817&hl=en"]; 72 "chrome/bin/answer.py?answer=96817&hl=en"];
67 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; 73 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
68 } 74 }
69 75
70 @end 76 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698