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

Side by Side Diff: chrome/browser/ui/webui/settings/about_handler.cc

Issue 2039273003: Cleanup: Remove VersionUpdater::RelaunchBrowser interface method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comment. Created 4 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
« no previous file with comments | « chrome/browser/ui/webui/help/version_updater_win.cc ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/settings/about_handler.h" 5 #include "chrome/browser/ui/webui/settings/about_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "ash/system/chromeos/devicetype_utils.h" 11 #include "ash/system/chromeos/devicetype_utils.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/i18n/message_formatter.h" 17 #include "base/i18n/message_formatter.h"
18 #include "base/location.h" 18 #include "base/location.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
21 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
22 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
23 #include "base/task_runner_util.h" 23 #include "base/task_runner_util.h"
24 #include "base/time/time.h" 24 #include "base/time/time.h"
25 #include "base/values.h" 25 #include "base/values.h"
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
28 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
29 #include "chrome/browser/lifetime/application_lifetime.h"
29 #include "chrome/browser/obsolete_system/obsolete_system.h" 30 #include "chrome/browser/obsolete_system/obsolete_system.h"
30 #include "chrome/browser/ui/browser.h" 31 #include "chrome/browser/ui/browser.h"
31 #include "chrome/browser/ui/browser_commands.h" 32 #include "chrome/browser/ui/browser_commands.h"
32 #include "chrome/browser/ui/browser_finder.h" 33 #include "chrome/browser/ui/browser_finder.h"
33 #include "chrome/browser/ui/chrome_pages.h" 34 #include "chrome/browser/ui/chrome_pages.h"
34 #include "chrome/common/channel_info.h" 35 #include "chrome/common/channel_info.h"
35 #include "chrome/common/chrome_content_client.h" 36 #include "chrome/common/chrome_content_client.h"
36 #include "chrome/common/pref_names.h" 37 #include "chrome/common/pref_names.h"
37 #include "chrome/common/url_constants.h" 38 #include "chrome/common/url_constants.h"
38 #include "chrome/grit/chromium_strings.h" 39 #include "chrome/grit/chromium_strings.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 } 458 }
458 459
459 #if defined(OS_MACOSX) 460 #if defined(OS_MACOSX)
460 void AboutHandler::PromoteUpdater(const base::ListValue* args) { 461 void AboutHandler::PromoteUpdater(const base::ListValue* args) {
461 version_updater_->PromoteUpdater(); 462 version_updater_->PromoteUpdater();
462 } 463 }
463 #endif 464 #endif
464 465
465 void AboutHandler::HandleRelaunchNow(const base::ListValue* args) { 466 void AboutHandler::HandleRelaunchNow(const base::ListValue* args) {
466 DCHECK(args->empty()); 467 DCHECK(args->empty());
467 version_updater_->RelaunchBrowser(); 468 chrome::AttemptRelaunch();
468 } 469 }
469 470
470 void AboutHandler::HandleOpenFeedbackDialog(const base::ListValue* args) { 471 void AboutHandler::HandleOpenFeedbackDialog(const base::ListValue* args) {
471 DCHECK(args->empty()); 472 DCHECK(args->empty());
472 Browser* browser = 473 Browser* browser =
473 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); 474 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents());
474 chrome::OpenFeedbackDialog(browser); 475 chrome::OpenFeedbackDialog(browser);
475 } 476 }
476 477
477 void AboutHandler::HandleOpenHelpPage(const base::ListValue* args) { 478 void AboutHandler::HandleOpenHelpPage(const base::ListValue* args) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost + 658 std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost +
658 "/" + path.MaybeAsASCII(); 659 "/" + path.MaybeAsASCII();
659 regulatory_info->SetString("url", url); 660 regulatory_info->SetString("url", url);
660 661
661 ResolveJavascriptCallback(base::StringValue(callback_id), *regulatory_info); 662 ResolveJavascriptCallback(base::StringValue(callback_id), *regulatory_info);
662 } 663 }
663 664
664 #endif // defined(OS_CHROMEOS) 665 #endif // defined(OS_CHROMEOS)
665 666
666 } // namespace settings 667 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/help/version_updater_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698