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

Side by Side Diff: ios/chrome/browser/net/ios_chrome_http_user_agent_settings.mm

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: self review Created 3 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698