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

Unified Diff: ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm

Issue 2559243003: Extend with a language code in http accept languages
Patch Set: Rebased, fixed nits and handed over this CL :( Created 4 years 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 | « chromecast/browser/cast_http_user_agent_settings.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm
diff --git a/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm b/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm
index 6a4c675bd02c9c6109a7101654e5428e8aefc63f..8352673642cefcbfcfe4f80bdc306bdfe31ef8c3 100644
--- a/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm
+++ b/ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm
@@ -8,7 +8,7 @@
#include "ios/chrome/browser/pref_names.h"
#include "ios/web/public/web_client.h"
#include "ios/web/public/web_thread.h"
-#include "net/http/http_util.h"
+#include "net/http/http_util_icu.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -19,8 +19,8 @@ IOSChromeHttpUserAgentSettings::IOSChromeHttpUserAgentSettings(
DCHECK_CURRENTLY_ON(web::WebThread::UI);
pref_accept_language_.Init(prefs::kAcceptLanguages, prefs);
last_pref_accept_language_ = *pref_accept_language_;
- last_http_accept_language_ =
- net::HttpUtil::GenerateAcceptLanguageHeader(last_pref_accept_language_);
+ last_http_accept_language_ = net::http_util_icu::GenerateAcceptLanguageHeader(
+ last_pref_accept_language_);
pref_accept_language_.MoveToThread(
web::WebThread::GetTaskRunnerForThread(web::WebThread::IO));
}
@@ -39,7 +39,8 @@ std::string IOSChromeHttpUserAgentSettings::GetAcceptLanguage() const {
std::string new_pref_accept_language = *pref_accept_language_;
if (new_pref_accept_language != last_pref_accept_language_) {
last_http_accept_language_ =
- net::HttpUtil::GenerateAcceptLanguageHeader(new_pref_accept_language);
+ net::http_util_icu::GenerateAcceptLanguageHeader(
+ new_pref_accept_language);
last_pref_accept_language_ = new_pref_accept_language;
}
return last_http_accept_language_;
« no previous file with comments | « chromecast/browser/cast_http_user_agent_settings.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698