diff options
Diffstat (limited to 'chrome/browser/chromeos/cros/network_library.cc')
-rw-r--r-- | chrome/browser/chromeos/cros/network_library.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc index 288bc0c..b99a40e 100644 --- a/chrome/browser/chromeos/cros/network_library.cc +++ b/chrome/browser/chromeos/cros/network_library.cc @@ -39,6 +39,7 @@ #include "chrome/browser/chromeos/cros_settings.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/network_login_observer.h" +#include "chrome/browser/net/browser_url_util.h" #include "chrome/common/time_format.h" #include "content/public/browser/browser_thread.h" #include "crypto/nss_util.h" // crypto::GetTPMTokenInfo() for 802.1X and VPN. @@ -122,6 +123,12 @@ const int kRecentPlanPaymentHours = 6; // If cellular device doesn't have SIM card, then retries are never used. const int kDefaultSimUnlockRetriesCount = 999; +// Redirect extension url for POST-ing url parameters to mobile account status +// sites. +const char kRedirectExtensionPage[] = + "chrome-extension://iadeocfgjdjdmpenejdbfeaocpbikmab/redirect.html?" + "autoPost=1"; + // List of cellular operators names that should have data roaming always enabled // to be able to connect to any network. const char* kAlwaysInRoamingOperators[] = { @@ -1201,6 +1208,20 @@ bool CellularNetwork::SupportsDataPlan() const { return !usage_url().empty() || !payment_url().empty(); } +GURL CellularNetwork::GetAccountInfoUrl() const { + if (!post_data_.length()) + return GURL(payment_url()); + + GURL base_url(kRedirectExtensionPage); + GURL temp_url = chrome_browser_net::AppendQueryParameter(base_url, + "post_data", + post_data_); + GURL redir_url = chrome_browser_net::AppendQueryParameter(temp_url, + "formUrl", + payment_url()); + return redir_url; +} + std::string CellularNetwork::GetNetworkTechnologyString() const { // No need to localize these cellular technology abbreviations. switch (network_technology_) { |