Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/browser/content_settings/content_settings_usages_state.cc

Issue 670953006: Componentize HostContentSettingsMap and content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win64 suppress warnings Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698