| OLD | NEW |
| 1 // Copyright (c) 2010 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 "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/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 *tab_state_flags |= TABSTATE_HAS_EXCEPTION; | 88 *tab_state_flags |= TABSTATE_HAS_EXCEPTION; |
| 89 if (saved_setting != i->second) | 89 if (saved_setting != i->second) |
| 90 *tab_state_flags |= TABSTATE_HAS_CHANGED; | 90 *tab_state_flags |= TABSTATE_HAS_CHANGED; |
| 91 if (saved_setting != CONTENT_SETTING_ASK) | 91 if (saved_setting != CONTENT_SETTING_ASK) |
| 92 *tab_state_flags |= TABSTATE_HAS_ANY_ICON; | 92 *tab_state_flags |= TABSTATE_HAS_ANY_ICON; |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 std::string GeolocationSettingsState::GURLToFormattedHost( | 96 std::string GeolocationSettingsState::GURLToFormattedHost( |
| 97 const GURL& url) const { | 97 const GURL& url) const { |
| 98 std::wstring display_host_wide; | 98 string16 display_host; |
| 99 net::AppendFormattedHost( | 99 net::AppendFormattedHost(url, |
| 100 url, UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), | 100 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host, |
| 101 &display_host_wide, NULL, NULL); | 101 NULL, NULL); |
| 102 return WideToUTF8(display_host_wide); | 102 return UTF16ToUTF8(display_host); |
| 103 } | 103 } |
| OLD | NEW |