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

Side by Side Diff: components/bookmarks/browser/bookmark_node_data_views.cc

Issue 2014733003: Removing parsing of text from pasteboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moving url parsing up the hierarchy Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/bookmarks/browser/bookmark_node_data.h" 5 #include "components/bookmarks/browser/bookmark_node_data.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/base/dragdrop/os_exchange_data.h" 10 #include "ui/base/dragdrop/os_exchange_data.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (data.HasCustomFormat(GetBookmarkFormatType())) { 50 if (data.HasCustomFormat(GetBookmarkFormatType())) {
51 base::Pickle drag_data_pickle; 51 base::Pickle drag_data_pickle;
52 if (data.GetPickledData(GetBookmarkFormatType(), &drag_data_pickle)) { 52 if (data.GetPickledData(GetBookmarkFormatType(), &drag_data_pickle)) {
53 if (!ReadFromPickle(&drag_data_pickle)) 53 if (!ReadFromPickle(&drag_data_pickle))
54 return false; 54 return false;
55 } 55 }
56 } else { 56 } else {
57 // See if there is a URL on the clipboard. 57 // See if there is a URL on the clipboard.
58 GURL url; 58 GURL url;
59 base::string16 title; 59 base::string16 title;
60 if (data.GetURLAndTitle( 60 if (data.GetURLAndTitle(ui::OSExchangeData::CONVERT_FILENAMES,
61 ui::OSExchangeData::CONVERT_FILENAMES, &url, &title)) 61 ui::OSExchangeData::PARSE_TEXT_AS_URL, &url,
62 &title))
62 ReadFromTuple(url, title); 63 ReadFromTuple(url, title);
63 } 64 }
64 65
65 return is_valid(); 66 return is_valid();
66 } 67 }
67 68
68 } // namespace bookmarks 69 } // namespace bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698