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

Side by Side Diff: content/browser/web_contents/web_drag_dest_mac.mm

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "content/browser/web_contents/web_drag_dest_mac.h" 5 #import "content/browser/web_contents/web_drag_dest_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 8
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 if ([types containsObject:NSFilenamesPboardType]) { 283 if ([types containsObject:NSFilenamesPboardType]) {
284 NSArray* files = [pboard propertyListForType:NSFilenamesPboardType]; 284 NSArray* files = [pboard propertyListForType:NSFilenamesPboardType];
285 if ([files isKindOfClass:[NSArray class]] && [files count]) { 285 if ([files isKindOfClass:[NSArray class]] && [files count]) {
286 for (NSUInteger i = 0; i < [files count]; i++) { 286 for (NSUInteger i = 0; i < [files count]; i++) {
287 NSString* filename = [files objectAtIndex:i]; 287 NSString* filename = [files objectAtIndex:i];
288 BOOL exists = [[NSFileManager defaultManager] 288 BOOL exists = [[NSFileManager defaultManager]
289 fileExistsAtPath:filename]; 289 fileExistsAtPath:filename];
290 if (exists) { 290 if (exists) {
291 data->filenames.push_back( 291 data->filenames.push_back(
292 DropData::FileInfo( 292 DropData::FileInfo(
293 base::SysNSStringToUTF16(filename), string16())); 293 base::SysNSStringToUTF16(filename), base::string16()));
294 } 294 }
295 } 295 }
296 } 296 }
297 } 297 }
298 298
299 // TODO(pinkerton): Get file contents. http://crbug.com/34661 299 // TODO(pinkerton): Get file contents. http://crbug.com/34661
300 300
301 // Get custom MIME data. 301 // Get custom MIME data.
302 if ([types containsObject:ui::kWebCustomDataPboardType]) { 302 if ([types containsObject:ui::kWebCustomDataPboardType]) {
303 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType]; 303 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType];
304 ui::ReadCustomDataIntoMap([customData bytes], 304 ui::ReadCustomDataIntoMap([customData bytes],
305 [customData length], 305 [customData length],
306 &data->custom_data); 306 &data->custom_data);
307 } 307 }
308 } 308 }
309 309
310 @end 310 @end
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_dest_gtk.cc ('k') | content/browser/web_contents/web_drag_dest_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698