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

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

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 "base/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"
11 #include "net/http/http_util.h" 11 #include "net/http/http_util.h"
12 12
13 IOSChromeHttpUserAgentSettings::IOSChromeHttpUserAgentSettings( 13 IOSChromeHttpUserAgentSettings::IOSChromeHttpUserAgentSettings(
14 PrefService* prefs) { 14 PrefService* prefs) {
15 DCHECK_CURRENTLY_ON_WEB_THREAD(web::WebThread::UI); 15 DCHECK_CURRENTLY_ON_WEB_THREAD(web::WebThread::UI);
16 pref_accept_language_.Init(prefs::kAcceptLanguages, prefs); 16 pref_accept_language_.Init(prefs::kAcceptLanguages, prefs);
17 last_pref_accept_language_ = *pref_accept_language_; 17 last_pref_accept_language_ = *pref_accept_language_;
(...skipping 20 matching lines...) Expand all
38 net::HttpUtil::GenerateAcceptLanguageHeader(new_pref_accept_language); 38 net::HttpUtil::GenerateAcceptLanguageHeader(new_pref_accept_language);
39 last_pref_accept_language_ = new_pref_accept_language; 39 last_pref_accept_language_ = new_pref_accept_language;
40 } 40 }
41 return last_http_accept_language_; 41 return last_http_accept_language_;
42 } 42 }
43 43
44 std::string IOSChromeHttpUserAgentSettings::GetUserAgent() const { 44 std::string IOSChromeHttpUserAgentSettings::GetUserAgent() const {
45 DCHECK_CURRENTLY_ON_WEB_THREAD(web::WebThread::IO); 45 DCHECK_CURRENTLY_ON_WEB_THREAD(web::WebThread::IO);
46 return web::GetWebClient()->GetUserAgent(false); 46 return web::GetWebClient()->GetUserAgent(false);
47 } 47 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/net/ios_chrome_http_user_agent_settings.h ('k') | ios/chrome/browser/net/ios_chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698