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

Unified Diff: net/base/net_util.h

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/file_stream_context.h ('k') | net/base/network_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 874f3e20308a27e165bdf7b3f2dc0ea60a86cf71..f21c1edb16ce2404f471adf3f1e5d951b1c8d221 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -26,10 +26,10 @@
#include "net/base/net_export.h"
#include "net/base/net_log.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class Time;
}
@@ -79,13 +79,13 @@ NET_EXPORT_PRIVATE extern size_t GetCountOfExplicitlyAllowedPorts();
// Given the full path to a file name, creates a file: URL. The returned URL
// may not be valid if the input is malformed.
-NET_EXPORT GURL FilePathToFileURL(const FilePath& path);
+NET_EXPORT GURL FilePathToFileURL(const base::FilePath& path);
// Converts a file: URL back to a filename that can be passed to the OS. The
// file URL must be well-formed (GURL::is_valid() must return true); we don't
// handle degenerate cases here. Returns true on success, false if it isn't a
// valid file URL. On failure, *file_path will be empty.
-NET_EXPORT bool FileURLToFilePath(const GURL& url, FilePath* file_path);
+NET_EXPORT bool FileURLToFilePath(const GURL& url, base::FilePath* file_path);
// Splits an input of the form <host>[":"<port>] into its consitituent parts.
// Saves the result into |*host| and |*port|. If the input did not have
@@ -278,12 +278,13 @@ NET_EXPORT string16 GetSuggestedFilename(const GURL& url,
const std::string& default_name);
// Similar to GetSuggestedFilename(), but returns a FilePath.
-NET_EXPORT FilePath GenerateFileName(const GURL& url,
- const std::string& content_disposition,
- const std::string& referrer_charset,
- const std::string& suggested_name,
- const std::string& mime_type,
- const std::string& default_name);
+NET_EXPORT base::FilePath GenerateFileName(
+ const GURL& url,
+ const std::string& content_disposition,
+ const std::string& referrer_charset,
+ const std::string& suggested_name,
+ const std::string& mime_type,
+ const std::string& default_name);
// Ensures that the filename and extension is safe to use in the filesystem.
//
@@ -304,7 +305,7 @@ NET_EXPORT FilePath GenerateFileName(const GURL& url,
// thread that allows IO.
NET_EXPORT void GenerateSafeFileName(const std::string& mime_type,
bool ignore_extension,
- FilePath* file_path);
+ base::FilePath* file_path);
// Checks |port| against a list of ports which are restricted by default.
// Returns true if |port| is allowed, false if it is restricted.
« no previous file with comments | « net/base/file_stream_context.h ('k') | net/base/network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698