OLD | NEW |
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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "components/bookmarks/browser/bookmark_utils.h" | 13 #include "components/bookmarks/browser/bookmark_utils.h" |
14 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 14 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
15 | 15 |
16 namespace bookmarks { | 16 namespace bookmarks { |
17 | 17 |
18 const char* BookmarkNodeData::kClipboardFormatString = | 18 const char BookmarkNodeData::kClipboardFormatString[] = |
19 "chromium/x-bookmark-entries"; | 19 "chromium/x-bookmark-entries"; |
20 | 20 |
21 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { | 21 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { |
22 } | 22 } |
23 | 23 |
24 BookmarkNodeData::Element::Element(const BookmarkNode* node) | 24 BookmarkNodeData::Element::Element(const BookmarkNode* node) |
25 : is_url(node->is_url()), | 25 : is_url(node->is_url()), |
26 url(node->url()), | 26 url(node->url()), |
27 title(node->GetTitle()), | 27 title(node->GetTitle()), |
28 date_added(node->date_added()), | 28 date_added(node->date_added()), |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 profile_path_ = profile_path; | 295 profile_path_ = profile_path; |
296 } | 296 } |
297 | 297 |
298 bool BookmarkNodeData::IsFromProfilePath( | 298 bool BookmarkNodeData::IsFromProfilePath( |
299 const base::FilePath& profile_path) const { | 299 const base::FilePath& profile_path) const { |
300 // An empty path means the data is not associated with any profile. | 300 // An empty path means the data is not associated with any profile. |
301 return !profile_path_.empty() && profile_path_ == profile_path; | 301 return !profile_path_.empty() && profile_path_ == profile_path; |
302 } | 302 } |
303 | 303 |
304 } // namespace bookmarks | 304 } // namespace bookmarks |
OLD | NEW |