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

Unified Diff: extensions/browser/api/vpn_provider/vpn_service.cc

Issue 990993003: Remove third-party VPN combined name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_1_407541_add_vpn_delegate
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/vpn_provider/vpn_service.cc
diff --git a/extensions/browser/api/vpn_provider/vpn_service.cc b/extensions/browser/api/vpn_provider/vpn_service.cc
index 7a51aac70dad68758c332cc4fb1fc6e35abfd96e..bde67710c042a73d2c27d9b7fa0fc7e0232b9934 100644
--- a/extensions/browser/api/vpn_provider/vpn_service.cc
+++ b/extensions/browser/api/vpn_provider/vpn_service.cc
@@ -40,13 +40,6 @@ std::string GetKey(const std::string& extension_id, const std::string& name) {
return base::HexEncode(key.data(), key.size());
}
-std::string GetCombinedName(const std::string& extension_name,
- const std::string& configuration_name) {
- // TODO(kaliamoorthi): (crbug.com/434711) Sort out the dependencies and
- // replace the string concatenation with internationalized version.
- return extension_name + ": " + configuration_name;
-}
-
void DoNothingFailureCallback(const std::string& error_name,
const std::string& error_message) {
LOG(ERROR) << error_name << ": " << error_message;
@@ -217,19 +210,14 @@ void VpnService::OnGetPropertiesSuccess(
service_path_to_configuration_map_.end()) {
return;
}
- const base::DictionaryValue* provider = nullptr;
std::string vpn_type;
std::string extension_id;
std::string type;
- std::string name;
std::string configuration_name;
- if (!dictionary.GetDictionary(shill::kProviderProperty, &provider) ||
- !dictionary.GetString(shill::kProviderTypeProperty, &vpn_type) ||
+ if (!dictionary.GetString(shill::kProviderTypeProperty, &vpn_type) ||
!dictionary.GetString(shill::kProviderHostProperty, &extension_id) ||
!dictionary.GetString(shill::kTypeProperty, &type) ||
- !dictionary.GetString(shill::kNameProperty, &name) ||
- !provider->GetString(shill::kConfigurationNameProperty,
- &configuration_name) ||
+ !dictionary.GetString(shill::kNameProperty, &configuration_name) ||
vpn_type != shill::kProviderThirdPartyVpn || type != shill::kTypeVPN) {
return;
}
@@ -303,9 +291,8 @@ void VpnService::CreateConfiguration(const std::string& extension_id,
base::DictionaryValue properties;
properties.SetStringWithoutPathExpansion(shill::kTypeProperty,
shill::kTypeVPN);
- properties.SetStringWithoutPathExpansion(
- shill::kNameProperty, // This value is shown to the user in native UI.
- GetCombinedName(extension_name, configuration_name));
+ properties.SetStringWithoutPathExpansion(shill::kNameProperty,
+ configuration_name);
properties.SetStringWithoutPathExpansion(shill::kProviderHostProperty,
extension_id);
properties.SetStringWithoutPathExpansion(shill::kObjectPathSuffixProperty,
@@ -314,8 +301,6 @@ void VpnService::CreateConfiguration(const std::string& extension_id,
shill::kProviderThirdPartyVpn);
properties.SetStringWithoutPathExpansion(shill::kProfileProperty,
profile->path);
- properties.SetStringWithoutPathExpansion(shill::kConfigurationNameProperty,
- configuration_name);
// Note: This will not create an entry in |policy_util|. TODO(pneubeck):
// Determine the correct thing to do here, crbug.com/459278.
« 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