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

Side by Side Diff: chrome/browser/ui/webui/help/help_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
OLDNEW
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/ui/webui/help/help_handler.h" 5 #include "chrome/browser/ui/webui/help/help_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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 531 }
531 532
532 #if defined(OS_MACOSX) 533 #if defined(OS_MACOSX)
533 void HelpHandler::PromoteUpdater(const base::ListValue* args) { 534 void HelpHandler::PromoteUpdater(const base::ListValue* args) {
534 version_updater_->PromoteUpdater(); 535 version_updater_->PromoteUpdater();
535 } 536 }
536 #endif 537 #endif
537 538
538 void HelpHandler::RelaunchNow(const base::ListValue* args) { 539 void HelpHandler::RelaunchNow(const base::ListValue* args) {
539 DCHECK(args->empty()); 540 DCHECK(args->empty());
540 version_updater_->RelaunchBrowser(); 541 chrome::AttemptRelaunch();
541 } 542 }
542 543
543 void HelpHandler::OpenFeedbackDialog(const base::ListValue* args) { 544 void HelpHandler::OpenFeedbackDialog(const base::ListValue* args) {
544 DCHECK(args->empty()); 545 DCHECK(args->empty());
545 Browser* browser = chrome::FindBrowserWithWebContents( 546 Browser* browser = chrome::FindBrowserWithWebContents(
546 web_ui()->GetWebContents()); 547 web_ui()->GetWebContents());
547 chrome::OpenFeedbackDialog(browser); 548 chrome::OpenFeedbackDialog(browser);
548 } 549 }
549 550
550 void HelpHandler::OpenHelpPage(const base::ListValue* args) { 551 void HelpHandler::OpenHelpPage(const base::ListValue* args) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 } 741 }
741 742
742 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { 743 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) {
743 // Remove unnecessary whitespace. 744 // Remove unnecessary whitespace.
744 web_ui()->CallJavascriptFunctionUnsafe( 745 web_ui()->CallJavascriptFunctionUnsafe(
745 "help.HelpPage.setRegulatoryLabelText", 746 "help.HelpPage.setRegulatoryLabelText",
746 base::StringValue(base::CollapseWhitespaceASCII(text, true))); 747 base::StringValue(base::CollapseWhitespaceASCII(text, true)));
747 } 748 }
748 749
749 #endif // defined(OS_CHROMEOS) 750 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/update_recommended_message_box.cc ('k') | chrome/browser/ui/webui/help/version_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698