OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h" | 5 #include "ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h" |
6 | 6 |
7 #include "components/prefs/pref_service.h" | 7 #include "components/prefs/pref_service.h" |
8 #include "ios/chrome/browser/pref_names.h" | 8 #include "ios/chrome/browser/pref_names.h" |
9 #include "ios/web/public/web_client.h" | 9 #include "ios/web/public/web_client.h" |
10 #include "ios/web/public/web_thread.h" | 10 #include "ios/web/public/web_thread.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 if (new_pref_accept_language != last_pref_accept_language_) { | 40 if (new_pref_accept_language != last_pref_accept_language_) { |
41 last_http_accept_language_ = | 41 last_http_accept_language_ = |
42 net::HttpUtil::GenerateAcceptLanguageHeader(new_pref_accept_language); | 42 net::HttpUtil::GenerateAcceptLanguageHeader(new_pref_accept_language); |
43 last_pref_accept_language_ = new_pref_accept_language; | 43 last_pref_accept_language_ = new_pref_accept_language; |
44 } | 44 } |
45 return last_http_accept_language_; | 45 return last_http_accept_language_; |
46 } | 46 } |
47 | 47 |
48 std::string IOSChromeHttpUserAgentSettings::GetUserAgent() const { | 48 std::string IOSChromeHttpUserAgentSettings::GetUserAgent() const { |
49 DCHECK_CURRENTLY_ON(web::WebThread::IO); | 49 DCHECK_CURRENTLY_ON(web::WebThread::IO); |
50 return web::GetWebClient()->GetUserAgent(false); | 50 return web::GetWebClient()->GetUserAgent(web::UserAgentType::MOBILE); |
51 } | 51 } |
OLD | NEW |