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/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #import "base/memory/scoped_nsobject.h" | 10 #import "base/memory/scoped_nsobject.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 } // namespace | 146 } // namespace |
147 | 147 |
148 namespace first_run { | 148 namespace first_run { |
149 | 149 |
150 void ShowFirstRunDialog(Profile* profile, | 150 void ShowFirstRunDialog(Profile* profile, |
151 bool randomize_search_engine_experiment) { | 151 bool randomize_search_engine_experiment) { |
152 // 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 |
153 // choose a default. | 153 // choose a default. |
154 TemplateURLService* model = TemplateURLServiceFactory::GetForProfile(profile); | 154 TemplateURLService* model = TemplateURLServiceFactory::GetForProfile(profile); |
155 if (FirstRun::ShouldShowSearchEngineSelector(model)) { | 155 if (first_run::ShouldShowSearchEngineSelector(model)) { |
156 ShowSearchEngineSelectionDialog(profile, | 156 ShowSearchEngineSelectionDialog(profile, |
157 randomize_search_engine_experiment); | 157 randomize_search_engine_experiment); |
158 } | 158 } |
159 ShowFirstRun(profile); | 159 ShowFirstRun(profile); |
160 } | 160 } |
161 | 161 |
162 } // namespace first_run | 162 } // namespace first_run |
163 | 163 |
164 @implementation FirstRunDialogController | 164 @implementation FirstRunDialogController |
165 | 165 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 - (IBAction)learnMore:(id)sender { | 301 - (IBAction)learnMore:(id)sender { |
302 GURL url = google_util::AppendGoogleLocaleParam( | 302 GURL url = google_util::AppendGoogleLocaleParam( |
303 GURL(chrome::kLearnMoreReportingURL)); | 303 GURL(chrome::kLearnMoreReportingURL)); |
304 NSString* urlStr = base::SysUTF8ToNSString(url.spec());; | 304 NSString* urlStr = base::SysUTF8ToNSString(url.spec());; |
305 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 305 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
306 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 306 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
307 } | 307 } |
308 | 308 |
309 @end | 309 @end |
OLD | NEW |