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/core/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/core/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 const char* BookmarkNodeData::kClipboardFormatString = | 16 const char* BookmarkNodeData::kClipboardFormatString = |
17 "chromium/x-bookmark-entries"; | 17 "chromium/x-bookmark-entries"; |
18 | 18 |
19 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { | 19 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { |
20 } | 20 } |
21 | 21 |
22 BookmarkNodeData::Element::Element(const BookmarkNode* node) | 22 BookmarkNodeData::Element::Element(const BookmarkNode* node) |
23 : is_url(node->is_url()), | 23 : is_url(node->is_url()), |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 const base::FilePath& profile_path) { | 276 const base::FilePath& profile_path) { |
277 DCHECK(profile_path_.empty()); | 277 DCHECK(profile_path_.empty()); |
278 profile_path_ = profile_path; | 278 profile_path_ = profile_path; |
279 } | 279 } |
280 | 280 |
281 bool BookmarkNodeData::IsFromProfilePath( | 281 bool BookmarkNodeData::IsFromProfilePath( |
282 const base::FilePath& profile_path) const { | 282 const base::FilePath& profile_path) const { |
283 // An empty path means the data is not associated with any profile. | 283 // An empty path means the data is not associated with any profile. |
284 return !profile_path_.empty() && profile_path_ == profile_path; | 284 return !profile_path_.empty() && profile_path_ == profile_path; |
285 } | 285 } |
OLD | NEW |