OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/content_settings/core/browser/content_settings_usages_state
.h" | 5 #include "components/content_settings/core/browser/content_settings_usages_state
.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
| 9 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
10 #include "components/content_settings/core/browser/host_content_settings_map.h" | 11 #include "components/content_settings/core/browser/host_content_settings_map.h" |
11 #include "components/prefs/pref_service.h" | |
12 #include "components/url_formatter/url_formatter.h" | 12 #include "components/url_formatter/url_formatter.h" |
13 | 13 |
14 ContentSettingsUsagesState::CommittedDetails::CommittedDetails() | 14 ContentSettingsUsagesState::CommittedDetails::CommittedDetails() |
15 : current_url_valid(false) { | 15 : current_url_valid(false) { |
16 } | 16 } |
17 | 17 |
18 ContentSettingsUsagesState::CommittedDetails::~CommittedDetails() {} | 18 ContentSettingsUsagesState::CommittedDetails::~CommittedDetails() {} |
19 | 19 |
20 ContentSettingsUsagesState::ContentSettingsUsagesState( | 20 ContentSettingsUsagesState::ContentSettingsUsagesState( |
21 HostContentSettingsMap* host_content_settings_map, | 21 HostContentSettingsMap* host_content_settings_map, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 std::string ContentSettingsUsagesState::GURLToFormattedHost( | 106 std::string ContentSettingsUsagesState::GURLToFormattedHost( |
107 const GURL& url) const { | 107 const GURL& url) const { |
108 base::string16 display_host; | 108 base::string16 display_host; |
109 url_formatter::AppendFormattedHost( | 109 url_formatter::AppendFormattedHost( |
110 url, pref_service_->GetString(accept_language_pref_), &display_host); | 110 url, pref_service_->GetString(accept_language_pref_), &display_host); |
111 return base::UTF16ToUTF8(display_host); | 111 return base::UTF16ToUTF8(display_host); |
112 } | 112 } |
OLD | NEW |