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

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

Issue 7249003: Move GetVersionStringModifier() and GetChannel() from platform_util_* to chrome_version_info_* (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: correct nits Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/sys_string_conversions.h" 11 #include "base/sys_string_conversions.h"
12 #include "chrome/browser/first_run/first_run.h" 12 #include "chrome/browser/first_run/first_run.h"
13 #include "chrome/browser/first_run/first_run_dialog.h" 13 #include "chrome/browser/first_run/first_run_dialog.h"
14 #include "chrome/browser/google/google_util.h" 14 #include "chrome/browser/google/google_util.h"
15 #include "chrome/browser/platform_util.h" 15 #include "chrome/browser/platform_util.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/search_engines/template_url_service.h" 17 #include "chrome/browser/search_engines/template_url_service.h"
18 #include "chrome/browser/search_engines/template_url_service_factory.h" 18 #include "chrome/browser/search_engines/template_url_service_factory.h"
19 #import "chrome/browser/ui/cocoa/search_engine_dialog_controller.h" 19 #import "chrome/browser/ui/cocoa/search_engine_dialog_controller.h"
20 #include "chrome/common/chrome_version_info.h"
20 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
21 #include "googleurl/src/gurl.h" 22 #include "googleurl/src/gurl.h"
22 #include "grit/locale_settings.h" 23 #include "grit/locale_settings.h"
23 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" 24 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
24 #include "ui/base/l10n/l10n_util_mac.h" 25 #include "ui/base/l10n/l10n_util_mac.h"
25 26
26 #if defined(GOOGLE_CHROME_BUILD) 27 #if defined(GOOGLE_CHROME_BUILD)
27 #import "chrome/app/breakpad_mac.h" 28 #import "chrome/app/breakpad_mac.h"
28 #include "chrome/browser/browser_process.h" 29 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/prefs/pref_service.h" 30 #include "chrome/browser/prefs/pref_service.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (search_engines_model && 132 if (search_engines_model &&
132 search_engines_model->GetDefaultSearchProvider()) { 133 search_engines_model->GetDefaultSearchProvider()) {
133 FirstRun::SetShowFirstRunBubblePref(true); 134 FirstRun::SetShowFirstRunBubblePref(true);
134 } 135 }
135 FirstRun::SetShowWelcomePagePref(); 136 FirstRun::SetShowWelcomePagePref();
136 } 137 }
137 138
138 // True when the stats checkbox should be checked by default. This is only 139 // True when the stats checkbox should be checked by default. This is only
139 // the case when the canary is running. 140 // the case when the canary is running.
140 bool StatsCheckboxDefault() { 141 bool StatsCheckboxDefault() {
141 return platform_util::GetChannel() == platform_util::CHANNEL_CANARY; 142 return chrome::VersionInfo::GetChannel() ==
143 chrome::VersionInfo::CHANNEL_CANARY;
142 } 144 }
143 145
144 } // namespace 146 } // namespace
145 147
146 namespace first_run { 148 namespace first_run {
147 149
148 void ShowFirstRunDialog(Profile* profile, 150 void ShowFirstRunDialog(Profile* profile,
149 bool randomize_search_engine_experiment) { 151 bool randomize_search_engine_experiment) {
150 // If the default search is not managed via policy, ask the user to 152 // If the default search is not managed via policy, ask the user to
151 // choose a default. 153 // choose a default.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 303
302 - (IBAction)learnMore:(id)sender { 304 - (IBAction)learnMore:(id)sender {
303 GURL url = google_util::AppendGoogleLocaleParam( 305 GURL url = google_util::AppendGoogleLocaleParam(
304 GURL(chrome::kLearnMoreReportingURL)); 306 GURL(chrome::kLearnMoreReportingURL));
305 NSString* urlStr = base::SysUTF8ToNSString(url.spec());; 307 NSString* urlStr = base::SysUTF8ToNSString(url.spec());;
306 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; 308 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr];
307 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; 309 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
308 } 310 }
309 311
310 @end 312 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/about_window_controller.mm ('k') | chrome/browser/ui/gtk/about_chrome_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698