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

Side by Side Diff: chrome/browser/net/chrome_http_user_agent_settings.cc

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/net/chrome_http_user_agent_settings.h" 5 #include "chrome/browser/net/chrome_http_user_agent_settings.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/common/pref_names.h" 8 #include "chrome/common/pref_names.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
11 #include "net/http/http_util.h" 11 #include "net/http/http_util.h"
12 12
13 ChromeHttpUserAgentSettings::ChromeHttpUserAgentSettings(PrefService* prefs) { 13 ChromeHttpUserAgentSettings::ChromeHttpUserAgentSettings(PrefService* prefs) {
14 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 14 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
15 pref_accept_language_.Init(prefs::kAcceptLanguages, prefs); 15 pref_accept_language_.Init(prefs::kAcceptLanguages, prefs);
16 pref_accept_charset_.Init(prefs::kDefaultCharset, prefs); 16 pref_accept_charset_.Init(prefs::kDefaultCharset, prefs);
17 last_pref_accept_language_ = *pref_accept_language_; 17 last_pref_accept_language_ = *pref_accept_language_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 last_pref_accept_charset_ = new_pref_accept_charset; 58 last_pref_accept_charset_ = new_pref_accept_charset;
59 } 59 }
60 return last_http_accept_charset_; 60 return last_http_accept_charset_;
61 } 61 }
62 62
63 std::string ChromeHttpUserAgentSettings::GetUserAgent(const GURL& url) const { 63 std::string ChromeHttpUserAgentSettings::GetUserAgent(const GURL& url) const {
64 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 64 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
65 return content::GetUserAgent(url); 65 return content::GetUserAgent(url);
66 } 66 }
67 67
OLDNEW
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698