| OLD | NEW |
| 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" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 } // namespace | 142 } // namespace |
| 143 | 143 |
| 144 namespace first_run { | 144 namespace first_run { |
| 145 | 145 |
| 146 void ShowFirstRunDialog(Profile* profile, | 146 void ShowFirstRunDialog(Profile* profile, |
| 147 bool randomize_search_engine_experiment) { | 147 bool randomize_search_engine_experiment) { |
| 148 // If the default search is not managed via policy, ask the user to | 148 // If the default search is not managed via policy, ask the user to |
| 149 // choose a default. | 149 // choose a default. |
| 150 TemplateURLModel* model = profile->GetTemplateURLModel(); | 150 TemplateURLModel* model = profile->GetTemplateURLModel(); |
| 151 if (model && !model->is_default_search_managed()) { | 151 if (!FirstRun::SearchEngineSelectorDisallowed() || |
| 152 model && !model->is_default_search_managed()) { |
| 152 ShowSearchEngineSelectionDialog(profile, | 153 ShowSearchEngineSelectionDialog(profile, |
| 153 randomize_search_engine_experiment); | 154 randomize_search_engine_experiment); |
| 154 } | 155 } |
| 155 ShowFirstRun(profile); | 156 ShowFirstRun(profile); |
| 156 } | 157 } |
| 157 | 158 |
| 158 } // namespace first_run | 159 } // namespace first_run |
| 159 | 160 |
| 160 @implementation FirstRunDialogController | 161 @implementation FirstRunDialogController |
| 161 | 162 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 299 |
| 299 - (IBAction)learnMore:(id)sender { | 300 - (IBAction)learnMore:(id)sender { |
| 300 GURL url = google_util::AppendGoogleLocaleParam( | 301 GURL url = google_util::AppendGoogleLocaleParam( |
| 301 GURL(chrome::kLearnMoreReportingURL)); | 302 GURL(chrome::kLearnMoreReportingURL)); |
| 302 NSString* urlStr = base::SysUTF8ToNSString(url.spec());; | 303 NSString* urlStr = base::SysUTF8ToNSString(url.spec());; |
| 303 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 304 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
| 304 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 305 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
| 305 } | 306 } |
| 306 | 307 |
| 307 @end | 308 @end |
| OLD | NEW |