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

Side by Side Diff: ui/base/dragdrop/cocoa_dnd_util.mm

Issue 17951002: ui/base/dragdrop: Use base::string16 now that string16 was moved into base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « ui/base/dragdrop/cocoa_dnd_util.h ('k') | ui/base/dragdrop/drag_utils.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) 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 "ui/base/dragdrop/cocoa_dnd_util.h" 5 #import "ui/base/dragdrop/cocoa_dnd_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #import "third_party/mozilla/NSPasteboard+Utils.h" 10 #import "third_party/mozilla/NSPasteboard+Utils.h"
11 11
12 namespace ui { 12 namespace ui {
13 13
14 NSString* const kChromeDragDummyPboardType = @"org.chromium.drag-dummy-type"; 14 NSString* const kChromeDragDummyPboardType = @"org.chromium.drag-dummy-type";
15 15
16 NSString* const kChromeDragImageHTMLPboardType = @"org.chromium.image-html"; 16 NSString* const kChromeDragImageHTMLPboardType = @"org.chromium.image-html";
17 17
18 BOOL PopulateURLAndTitleFromPasteboard(GURL* url, 18 BOOL PopulateURLAndTitleFromPasteboard(GURL* url,
19 string16* title, 19 base::string16* title,
20 NSPasteboard* pboard, 20 NSPasteboard* pboard,
21 BOOL convert_filenames) { 21 BOOL convert_filenames) {
22 CHECK(url); 22 CHECK(url);
23 23
24 // Bail out early if there's no URL data. 24 // Bail out early if there's no URL data.
25 if (![pboard containsURLData]) 25 if (![pboard containsURLData])
26 return NO; 26 return NO;
27 27
28 // -getURLs:andTitles:convertingFilenames: will already validate URIs so we 28 // -getURLs:andTitles:convertingFilenames: will already validate URIs so we
29 // don't need to again. The arrays returned are both of NSStrings. 29 // don't need to again. The arrays returned are both of NSStrings.
(...skipping 14 matching lines...) Expand all
44 *url = GURL(utf8_url); 44 *url = GURL(utf8_url);
45 // Extra paranoia check. 45 // Extra paranoia check.
46 if (title && [title_array count]) 46 if (title && [title_array count])
47 *title = base::SysNSStringToUTF16([title_array objectAtIndex:0]); 47 *title = base::SysNSStringToUTF16([title_array objectAtIndex:0]);
48 } 48 }
49 } 49 }
50 return YES; 50 return YES;
51 } 51 }
52 52
53 } // namespace ui 53 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/dragdrop/cocoa_dnd_util.h ('k') | ui/base/dragdrop/drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698