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 "chrome/browser/content_settings/content_settings_usages_state.h" | 5 #include "chrome/browser/content_settings/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/prefs/pref_service.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/content_settings/host_content_settings_map.h" | |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "components/content_settings/core/browser/host_content_settings_map.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 ContentSettingsUsagesState::ContentSettingsUsagesState(Profile* profile, | 19 ContentSettingsUsagesState::ContentSettingsUsagesState(Profile* profile, |
20 ContentSettingsType type) | 20 ContentSettingsType type) |
21 : profile_(profile), | 21 : profile_(profile), |
22 type_(type) { | 22 type_(type) { |
23 } | 23 } |
24 | 24 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 std::string ContentSettingsUsagesState::GURLToFormattedHost( | 102 std::string ContentSettingsUsagesState::GURLToFormattedHost( |
103 const GURL& url) const { | 103 const GURL& url) const { |
104 base::string16 display_host; | 104 base::string16 display_host; |
105 net::AppendFormattedHost(url, | 105 net::AppendFormattedHost(url, |
106 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host); | 106 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host); |
107 return base::UTF16ToUTF8(display_host); | 107 return base::UTF16ToUTF8(display_host); |
108 } | 108 } |
OLD | NEW |