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

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

Issue 1171333003: Move net::FormatUrl and friends outside of //net and into //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again now that CQ is fixed Created 5 years, 4 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
« no previous file with comments | « components/content_settings/core/browser/DEPS ('k') | components/error_page.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "components/content_settings/core/browser/host_content_settings_map.h" 11 #include "components/content_settings/core/browser/host_content_settings_map.h"
12 #include "net/base/net_util.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,
22 ContentSettingsType type, 22 ContentSettingsType type,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (saved_setting != i->second) 99 if (saved_setting != i->second)
100 *tab_state_flags |= TABSTATE_HAS_CHANGED; 100 *tab_state_flags |= TABSTATE_HAS_CHANGED;
101 if (saved_setting != CONTENT_SETTING_ASK) 101 if (saved_setting != CONTENT_SETTING_ASK)
102 *tab_state_flags |= TABSTATE_HAS_ANY_ICON; 102 *tab_state_flags |= TABSTATE_HAS_ANY_ICON;
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 net::AppendFormattedHost(url, pref_service_->GetString(accept_language_pref_), 109 url_formatter::AppendFormattedHost(
110 &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
« no previous file with comments | « components/content_settings/core/browser/DEPS ('k') | components/error_page.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698