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

Side by Side Diff: chrome/browser/geolocation/geolocation_settings_state.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/geolocation/geolocation_settings_state.h" 5 #include "chrome/browser/geolocation/geolocation_settings_state.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h"
9 #include "base/string_piece.h" 10 #include "base/string_piece.h"
10 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/content_settings/host_content_settings_map.h" 12 #include "chrome/browser/content_settings/host_content_settings_map.h"
12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "content/public/browser/navigation_details.h" 15 #include "content/public/browser/navigation_details.h"
16 #include "content/public/browser/navigation_entry.h" 16 #include "content/public/browser/navigation_entry.h"
17 #include "net/base/net_util.h" 17 #include "net/base/net_util.h"
18 18
19 GeolocationSettingsState::GeolocationSettingsState(Profile* profile) 19 GeolocationSettingsState::GeolocationSettingsState(Profile* profile)
20 : profile_(profile) { 20 : profile_(profile) {
21 } 21 }
22 22
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 } 101 }
102 102
103 std::string GeolocationSettingsState::GURLToFormattedHost( 103 std::string GeolocationSettingsState::GURLToFormattedHost(
104 const GURL& url) const { 104 const GURL& url) const {
105 string16 display_host; 105 string16 display_host;
106 net::AppendFormattedHost(url, 106 net::AppendFormattedHost(url,
107 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host); 107 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host);
108 return UTF16ToUTF8(display_host); 108 return UTF16ToUTF8(display_host);
109 } 109 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_infobar_queue_controller.cc ('k') | chrome/browser/google/google_url_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698