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

Side by Side Diff: chrome/browser/geolocation/geolocation_settings_state.cc

Issue 6898026: Eliminate wstring from base/utf_offset_string_conversions.h, net/base/escape.h, and net/base/net_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/geolocation/geolocation_settings_state.h" 5 #include "chrome/browser/geolocation/geolocation_settings_state.h"
6 6
7 #include "base/string_piece.h" 7 #include "base/string_piece.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 *tab_state_flags |= TABSTATE_HAS_EXCEPTION; 88 *tab_state_flags |= TABSTATE_HAS_EXCEPTION;
89 if (saved_setting != i->second) 89 if (saved_setting != i->second)
90 *tab_state_flags |= TABSTATE_HAS_CHANGED; 90 *tab_state_flags |= TABSTATE_HAS_CHANGED;
91 if (saved_setting != CONTENT_SETTING_ASK) 91 if (saved_setting != CONTENT_SETTING_ASK)
92 *tab_state_flags |= TABSTATE_HAS_ANY_ICON; 92 *tab_state_flags |= TABSTATE_HAS_ANY_ICON;
93 } 93 }
94 } 94 }
95 95
96 std::string GeolocationSettingsState::GURLToFormattedHost( 96 std::string GeolocationSettingsState::GURLToFormattedHost(
97 const GURL& url) const { 97 const GURL& url) const {
98 std::wstring display_host_wide; 98 string16 display_host;
99 net::AppendFormattedHost( 99 net::AppendFormattedHost(url,
100 url, UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), 100 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), &display_host);
101 &display_host_wide, NULL, NULL); 101 return UTF16ToUTF8(display_host);
102 return WideToUTF8(display_host_wide);
103 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698