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

Side by Side Diff: chrome/browser/views/first_run_view.cc

Issue 99136: Make Chrome default after importing from current default browser. (Closed)
Patch Set: Created 11 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/views/first_run_view.h" 5 #include "chrome/browser/views/first_run_view.h"
6 6
7 #include "chrome/browser/importer/importer.h" 7 #include "chrome/browser/importer/importer.h"
8 #include "chrome/browser/first_run.h" 8 #include "chrome/browser/first_run.h"
9 #include "chrome/browser/metrics/user_metrics.h" 9 #include "chrome/browser/metrics/user_metrics.h"
10 #include "chrome/browser/views/first_run_customize_view.h" 10 #include "chrome/browser/views/first_run_customize_view.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 bool FirstRunView::Accept() { 173 bool FirstRunView::Accept() {
174 if (!IsDialogButtonEnabled(MessageBoxFlags::DIALOGBUTTON_OK)) 174 if (!IsDialogButtonEnabled(MessageBoxFlags::DIALOGBUTTON_OK))
175 return false; 175 return false;
176 176
177 DisableButtons(); 177 DisableButtons();
178 customize_link_->SetEnabled(false); 178 customize_link_->SetEnabled(false);
179 CreateDesktopShortcut(); 179 CreateDesktopShortcut();
180 CreateQuickLaunchShortcut(); 180 CreateQuickLaunchShortcut();
181 if (default_browser_->checked())
182 SetDefaultBrowser();
183 // Index 0 is the default browser. 181 // Index 0 is the default browser.
184 FirstRun::ImportSettings(profile_, 182 FirstRun::ImportSettings(profile_,
185 importer_host_->GetSourceProfileInfoAt(0).browser_type, 183 importer_host_->GetSourceProfileInfoAt(0).browser_type,
186 GetDefaultImportItems(), window()->GetNativeWindow()); 184 GetDefaultImportItems(), window()->GetNativeWindow());
187 UserMetrics::RecordAction(L"FirstRunDef_Accept", profile_); 185 UserMetrics::RecordAction(L"FirstRunDef_Accept", profile_);
186 if (default_browser_->checked())
187 SetDefaultBrowser();
188 188
189 return true; 189 return true;
190 } 190 }
191 191
192 bool FirstRunView::Cancel() { 192 bool FirstRunView::Cancel() {
193 UserMetrics::RecordAction(L"FirstRunDef_Cancel", profile_); 193 UserMetrics::RecordAction(L"FirstRunDef_Cancel", profile_);
194 return true; 194 return true;
195 } 195 }
196 196
197 // Notification from the customize dialog that the user accepted. Since all 197 // Notification from the customize dialog that the user accepted. Since all
198 // the work is done there we got nothing else to do. 198 // the work is done there we got nothing else to do.
199 void FirstRunView::CustomizeAccepted() { 199 void FirstRunView::CustomizeAccepted() {
200 window()->Close(); 200 window()->Close();
201 } 201 }
202 202
203 // Notification from the customize dialog that the user cancelled. 203 // Notification from the customize dialog that the user cancelled.
204 void FirstRunView::CustomizeCanceled() { 204 void FirstRunView::CustomizeCanceled() {
205 UserMetrics::RecordAction(L"FirstRunCustom_Cancel", profile_); 205 UserMetrics::RecordAction(L"FirstRunCustom_Cancel", profile_);
206 } 206 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698