Index: chrome/browser/ui/webui/about_ui.cc |
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc |
index 5e5c545e8c504c1cc0b0534a60aeb15705d5ddd7..58701b6e3976b166ce7a05335a54e3966b662bbe 100644 |
--- a/chrome/browser/ui/webui/about_ui.cc |
+++ b/chrome/browser/ui/webui/about_ui.cc |
@@ -103,7 +103,7 @@ const char kMemoryCssPath[] = "about_memory.css"; |
const char kStatsJsPath[] = "stats.js"; |
const char kStringsJsPath[] = "strings.js"; |
// chrome://terms falls back to offline page after kOnlineTermsTimeoutSec. |
-const int kOnlineTermsTimeoutSec = 10; |
+const int kOnlineTermsTimeoutSec = 7; |
// When you type about:memory, it actually loads this intermediate URL that |
// redirects you to the final page. This avoids the problem where typing |
@@ -145,18 +145,21 @@ class AboutMemoryHandler : public MemoryDetails { |
}; |
#if defined(OS_CHROMEOS) |
+ |
// Helper class that fetches the online Chrome OS terms. Empty string is |
// returned once fetching failed or exceeded |kOnlineTermsTimeoutSec|. |
class ChromeOSOnlineTermsHandler : public net::URLFetcherDelegate { |
public: |
typedef base::Callback<void (ChromeOSOnlineTermsHandler*)> FetchCallback; |
- explicit ChromeOSOnlineTermsHandler(const FetchCallback& callback) |
+ explicit ChromeOSOnlineTermsHandler(const FetchCallback& callback, |
+ const std::string& locale) |
: fetch_callback_(callback) { |
- eula_fetcher_.reset(net::URLFetcher::Create( |
- GURL(l10n_util::GetStringUTF16(IDS_EULA_POLICY_URL)), |
- net::URLFetcher::GET, |
- this)); |
+ std::string eula_URL = base::StringPrintf(chrome::kOnlineEulaURLPath, |
Evan Stade
2013/05/07 21:52:17
I thought the idea was to rely on acceptlanguages
vasilii
2013/05/08 07:36:30
No, they have prepared a list of URL in Chrome for
|
+ locale.c_str()); |
+ eula_fetcher_.reset(net::URLFetcher::Create(GURL(eula_URL), |
+ net::URLFetcher::GET, |
+ this)); |
eula_fetcher_->SetRequestContext( |
g_browser_process->system_request_context()); |
eula_fetcher_->AddExtraRequestHeader("Accept: text/html"); |
@@ -257,7 +260,8 @@ class ChromeOSTermsHandler |
// Try to load online version of ChromeOS terms first. |
// ChromeOSOnlineTermsHandler object destroys itself. |
new ChromeOSOnlineTermsHandler( |
- base::Bind(&ChromeOSTermsHandler::OnOnlineEULAFetched, this)); |
+ base::Bind(&ChromeOSTermsHandler::OnOnlineEULAFetched, this), |
+ locale_); |
} |
} |