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" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/strings/sys_string_conversions.h" | 12 #include "base/strings/sys_string_conversions.h" |
13 #include "chrome/browser/first_run/first_run.h" | 13 #include "chrome/browser/first_run/first_run.h" |
14 #include "chrome/browser/first_run/first_run_dialog.h" | 14 #include "chrome/browser/first_run/first_run_dialog.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/search_engines/template_url_service_factory.h" | 16 #include "chrome/browser/search_engines/template_url_service_factory.h" |
17 #include "chrome/browser/shell_integration.h" | 17 #include "chrome/browser/shell_integration.h" |
18 #include "chrome/common/chrome_version_info.h" | 18 #include "chrome/common/channel_info.h" |
19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
20 #include "components/search_engines/template_url_service.h" | 20 #include "components/search_engines/template_url_service.h" |
| 21 #include "components/version_info/version_info.h" |
21 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | 22 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
22 #include "ui/base/l10n/l10n_util_mac.h" | 23 #include "ui/base/l10n/l10n_util_mac.h" |
23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
24 | 25 |
25 #if defined(GOOGLE_CHROME_BUILD) | 26 #if defined(GOOGLE_CHROME_BUILD) |
26 #include "base/prefs/pref_service.h" | 27 #include "base/prefs/pref_service.h" |
27 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
28 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
29 #include "chrome/installer/util/google_update_settings.h" | 30 #include "chrome/installer/util/google_update_settings.h" |
30 #endif | 31 #endif |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 first_run::SetShowFirstRunBubblePref(first_run::FIRST_RUN_BUBBLE_SHOW); | 120 first_run::SetShowFirstRunBubblePref(first_run::FIRST_RUN_BUBBLE_SHOW); |
120 } | 121 } |
121 first_run::SetShouldShowWelcomePage(); | 122 first_run::SetShouldShowWelcomePage(); |
122 | 123 |
123 return dialog_shown; | 124 return dialog_shown; |
124 } | 125 } |
125 | 126 |
126 // True when the stats checkbox should be checked by default. This is only | 127 // True when the stats checkbox should be checked by default. This is only |
127 // the case when the canary is running. | 128 // the case when the canary is running. |
128 bool StatsCheckboxDefault() { | 129 bool StatsCheckboxDefault() { |
129 return chrome::VersionInfo::GetChannel() == | 130 return chrome::GetChannel() == version_info::Channel::CANARY; |
130 version_info::Channel::CANARY; | |
131 } | 131 } |
132 | 132 |
133 } // namespace | 133 } // namespace |
134 | 134 |
135 namespace first_run { | 135 namespace first_run { |
136 | 136 |
137 bool ShowFirstRunDialog(Profile* profile) { | 137 bool ShowFirstRunDialog(Profile* profile) { |
138 return ShowFirstRun(profile); | 138 return ShowFirstRun(profile); |
139 } | 139 } |
140 | 140 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 [NSApp stopModal]; | 278 [NSApp stopModal]; |
279 } | 279 } |
280 | 280 |
281 - (IBAction)learnMore:(id)sender { | 281 - (IBAction)learnMore:(id)sender { |
282 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); | 282 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); |
283 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 283 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
284 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 284 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
285 } | 285 } |
286 | 286 |
287 @end | 287 @end |
OLD | NEW |