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

Unified Diff: content/browser/web_contents/web_drag_source_mac.mm

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_drag_source_mac.mm
diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm
index b59be11d66d00f86b4e99bf3d9b3cea1a7438307..f371dcb6dacdd7978b7fdd1c71665214eba3f6cf 100644
--- a/content/browser/web_contents/web_drag_source_mac.mm
+++ b/content/browser/web_contents/web_drag_source_mac.mm
@@ -51,19 +51,20 @@ NSString* const kNSURLTitlePboardType = @"public.url-name";
// Converts a string16 into a FilePath. Use this method instead of
// -[NSString fileSystemRepresentation] to prevent exceptions from being thrown.
// See http://crbug.com/78782 for more info.
-FilePath FilePathFromFilename(const string16& filename) {
+base::FilePath FilePathFromFilename(const string16& filename) {
NSString* str = SysUTF16ToNSString(filename);
char buf[MAXPATHLEN];
if (![str getFileSystemRepresentation:buf maxLength:sizeof(buf)])
- return FilePath();
- return FilePath(buf);
+ return base::FilePath();
+ return base::FilePath(buf);
}
// Returns a filename appropriate for the drop data
// TODO(viettrungluu): Refactor to make it common across platforms,
// and move it somewhere sensible.
-FilePath GetFileNameFromDragData(const WebDropData& drop_data) {
- FilePath file_name(FilePathFromFilename(drop_data.file_description_filename));
+base::FilePath GetFileNameFromDragData(const WebDropData& drop_data) {
+ base::FilePath file_name(
+ FilePathFromFilename(drop_data.file_description_filename));
// Images without ALT text will only have a file extension so we need to
// synthesize one from the provided extension and URL.
@@ -318,9 +319,9 @@ void PromiseWriterHelper(const WebDropData& drop_data,
return nil;
}
- FilePath fileName = downloadFileName_.empty() ?
+ base::FilePath fileName = downloadFileName_.empty() ?
GetFileNameFromDragData(*dropData_) : downloadFileName_;
- FilePath filePath(SysNSStringToUTF8(path));
+ base::FilePath filePath(SysNSStringToUTF8(path));
filePath = filePath.Append(fileName);
// CreateFileStreamForDrop() will call file_util::PathExists(),
@@ -388,7 +389,7 @@ void PromiseWriterHelper(const WebDropData& drop_data,
net::GetMimeTypeFromExtension(fileExtension, &mimeType);
} else {
string16 mimeType16;
- FilePath fileName;
+ base::FilePath fileName;
if (content::ParseDownloadMetadata(
dropData_->download_metadata,
&mimeType16,
« no previous file with comments | « content/browser/web_contents/web_drag_source_mac.h ('k') | content/browser/webui/shared_resources_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698