| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |