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

Side by Side Diff: net/base/net_util.h

Issue 6241001: wstring: make net::GetSuggestedFilename return utf-16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 9 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc ('k') | net/base/net_util.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef NET_BASE_NET_UTIL_H_ 5 #ifndef NET_BASE_NET_UTIL_H_
6 #define NET_BASE_NET_UTIL_H_ 6 #define NET_BASE_NET_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 // Gets the filename from the raw Content-Disposition header (as read from the 253 // Gets the filename from the raw Content-Disposition header (as read from the
254 // network). Otherwise uses the last path component name or hostname from 254 // network). Otherwise uses the last path component name or hostname from
255 // |url|. If there is no filename or it can't be used, the given |default_name|, 255 // |url|. If there is no filename or it can't be used, the given |default_name|,
256 // will be used unless it is empty. 256 // will be used unless it is empty.
257 257
258 // Note: it's possible for the suggested filename to be empty (e.g., 258 // Note: it's possible for the suggested filename to be empty (e.g.,
259 // file:///). referrer_charset is used as one of charsets 259 // file:///). referrer_charset is used as one of charsets
260 // to interpret a raw 8bit string in C-D header (after interpreting 260 // to interpret a raw 8bit string in C-D header (after interpreting
261 // as UTF-8 fails). See the comment for GetFilenameFromCD for more details. 261 // as UTF-8 fails). See the comment for GetFilenameFromCD for more details.
262 FilePath GetSuggestedFilename(const GURL& url, 262 string16 GetSuggestedFilename(const GURL& url,
263 const std::string& content_disposition, 263 const std::string& content_disposition,
264 const std::string& referrer_charset, 264 const std::string& referrer_charset,
265 const FilePath& default_name); 265 const string16& default_name);
266 266
267 // Checks the given port against a list of ports which are restricted by 267 // Checks the given port against a list of ports which are restricted by
268 // default. Returns true if the port is allowed, false if it is restricted. 268 // default. Returns true if the port is allowed, false if it is restricted.
269 bool IsPortAllowedByDefault(int port); 269 bool IsPortAllowedByDefault(int port);
270 270
271 // Checks the given port against a list of ports which are restricted by the 271 // Checks the given port against a list of ports which are restricted by the
272 // FTP protocol. Returns true if the port is allowed, false if it is 272 // FTP protocol. Returns true if the port is allowed, false if it is
273 // restricted. 273 // restricted.
274 bool IsPortAllowedByFtp(int port); 274 bool IsPortAllowedByFtp(int port);
275 275
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 // Returns the port field of the sockaddr in |info|. 406 // Returns the port field of the sockaddr in |info|.
407 uint16* GetPortFieldFromAddrinfo(const struct addrinfo* info); 407 uint16* GetPortFieldFromAddrinfo(const struct addrinfo* info);
408 408
409 // Returns the value of |info's| port (in host byte ordering). 409 // Returns the value of |info's| port (in host byte ordering).
410 int GetPortFromAddrinfo(const struct addrinfo* info); 410 int GetPortFromAddrinfo(const struct addrinfo* info);
411 411
412 } // namespace net 412 } // namespace net
413 413
414 #endif // NET_BASE_NET_UTIL_H_ 414 #endif // NET_BASE_NET_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698