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

Side by Side Diff: components/content_settings/core/browser/content_settings_usages_state.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 "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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698