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

Side by Side Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 2897773002: Show proper message in about Chrome OS page (Closed)
Patch Set: Prevent updated status when dialog is shown Created 3 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
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
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const char kDefaultRegionCode[] = "us"; 91 const char kDefaultRegionCode[] = "us";
92 92
93 struct RegulatoryLabel { 93 struct RegulatoryLabel {
94 const std::string label_text; 94 const std::string label_text;
95 const std::string image_url; 95 const std::string image_url;
96 }; 96 };
97 97
98 // Returns message that informs user that for update it's better to 98 // Returns message that informs user that for update it's better to
99 // connect to a network of one of the allowed types. 99 // connect to a network of one of the allowed types.
100 base::string16 GetAllowedConnectionTypesMessage() { 100 base::string16 GetAllowedConnectionTypesMessage() {
101 if (help_utils_chromeos::IsUpdateOverCellularAllowed()) { 101 // Old help page does not support interactive-updates over cellular, so just
102 // sets |interactive| to false to make its behavior the same as before.
103 if (help_utils_chromeos::IsUpdateOverCellularAllowed(
104 false /* interactive */)) {
102 return l10n_util::GetStringUTF16(IDS_UPGRADE_NETWORK_LIST_CELLULAR_ALLOWED); 105 return l10n_util::GetStringUTF16(IDS_UPGRADE_NETWORK_LIST_CELLULAR_ALLOWED);
103 } else { 106 } else {
104 return l10n_util::GetStringUTF16( 107 return l10n_util::GetStringUTF16(
105 IDS_UPGRADE_NETWORK_LIST_CELLULAR_DISALLOWED); 108 IDS_UPGRADE_NETWORK_LIST_CELLULAR_DISALLOWED);
106 } 109 }
107 } 110 }
108 111
109 // Returns true if the device is enterprise managed, false otherwise. 112 // Returns true if the device is enterprise managed, false otherwise.
110 bool IsEnterpriseManaged() { 113 bool IsEnterpriseManaged() {
111 policy::BrowserPolicyConnectorChromeOS* connector = 114 policy::BrowserPolicyConnectorChromeOS* connector =
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 base::Value("device_supported"), 757 base::Value("device_supported"),
755 base::Value("")); 758 base::Value(""));
756 } else { 759 } else {
757 web_ui()->CallJavascriptFunctionUnsafe( 760 web_ui()->CallJavascriptFunctionUnsafe(
758 "help.HelpPage.updateEolMessage", base::Value("device_endoflife"), 761 "help.HelpPage.updateEolMessage", base::Value("device_endoflife"),
759 base::Value(l10n_util::GetStringUTF16(IDS_ABOUT_PAGE_EOL_EOL))); 762 base::Value(l10n_util::GetStringUTF16(IDS_ABOUT_PAGE_EOL_EOL)));
760 } 763 }
761 } 764 }
762 765
763 #endif // defined(OS_CHROMEOS) 766 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698