Chromium Code Reviews| 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 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 5 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
| 6 | 6 |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 328 if (try_chrome_->checked()) | 328 if (try_chrome_->checked()) |
| 329 result_ = TRY_CHROME; | 329 result_ = TRY_CHROME; |
| 330 else if (dont_try_chrome_ && dont_try_chrome_->checked()) | 330 else if (dont_try_chrome_ && dont_try_chrome_->checked()) |
| 331 result_ = NOT_NOW; | 331 result_ = NOT_NOW; |
| 332 else if (kill_chrome_ && kill_chrome_->checked()) | 332 else if (kill_chrome_ && kill_chrome_->checked()) |
| 333 result_ = UNINSTALL_CHROME; | 333 result_ = UNINSTALL_CHROME; |
| 334 else | 334 else |
| 335 NOTREACHED() << "Unknown radio button selected"; | 335 NOTREACHED() << "Unknown radio button selected"; |
| 336 } | 336 } |
| 337 | 337 |
| 338 if ((result_ == TRY_CHROME) && make_default_->checked()) | 338 if (make_default_) { |
|
sky
2012/08/16 23:11:45
combine into a single if.
| |
| 339 result_ = TRY_CHROME_AS_DEFAULT; | 339 if ((result_ == TRY_CHROME) && make_default_->checked()) |
| 340 result_ = TRY_CHROME_AS_DEFAULT; | |
| 341 } | |
| 340 | 342 |
| 341 popup_->Close(); | 343 popup_->Close(); |
| 342 MessageLoop::current()->Quit(); | 344 MessageLoop::current()->Quit(); |
| 343 } | 345 } |
| 344 | 346 |
| 345 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { | 347 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { |
| 346 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); | 348 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); |
| 347 } | 349 } |
| OLD | NEW |