OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/string_piece.h" | 7 #include "base/string_piece.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
10 #include "chrome/browser/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/tab_contents/navigation_entry.h" | 12 #include "chrome/browser/tab_contents/navigation_entry.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "net/base/net_util.h" | 14 #include "net/base/net_util.h" |
15 | 15 |
16 GeolocationSettingsState::GeolocationSettingsState(Profile* profile) | 16 GeolocationSettingsState::GeolocationSettingsState(Profile* profile) |
17 : profile_(profile) { | 17 : profile_(profile) { |
18 } | 18 } |
19 | 19 |
20 GeolocationSettingsState::~GeolocationSettingsState() { | 20 GeolocationSettingsState::~GeolocationSettingsState() { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 std::string GeolocationSettingsState::GURLToFormattedHost( | 92 std::string GeolocationSettingsState::GURLToFormattedHost( |
93 const GURL& url) const { | 93 const GURL& url) const { |
94 std::wstring display_host_wide; | 94 std::wstring display_host_wide; |
95 net::AppendFormattedHost( | 95 net::AppendFormattedHost( |
96 url, UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), | 96 url, UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), |
97 &display_host_wide, NULL, NULL); | 97 &display_host_wide, NULL, NULL); |
98 return WideToUTF8(display_host_wide); | 98 return WideToUTF8(display_host_wide); |
99 } | 99 } |
OLD | NEW |