| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/bookmarks/bookmark_node_data.h" | 5 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| 6 | 6 |
| 7 #include "app/clipboard/scoped_clipboard_writer.h" | 7 #include "app/clipboard/scoped_clipboard_writer.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 13 #if defined(OS_MACOSX) | 13 #if defined(OS_MACOSX) |
| 14 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 14 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
| 15 #endif | 15 #endif |
| 16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
| 18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 19 #include "net/base/escape.h" | 19 #include "net/base/escape.h" |
| 20 | 20 |
| 21 const char* BookmarkNodeData::kClipboardFormatString = | 21 const char* BookmarkNodeData::kClipboardFormatString = |
| 22 "chromium/x-bookmark-entries"; | 22 "chromium/x-bookmark-entries"; |
| 23 | 23 |
| 24 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { | 24 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 DCHECK(profile_path_.empty()); | 317 DCHECK(profile_path_.empty()); |
| 318 | 318 |
| 319 if (profile) | 319 if (profile) |
| 320 profile_path_ = profile->GetPath().value(); | 320 profile_path_ = profile->GetPath().value(); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool BookmarkNodeData::IsFromProfile(Profile* profile) const { | 323 bool BookmarkNodeData::IsFromProfile(Profile* profile) const { |
| 324 // An empty path means the data is not associated with any profile. | 324 // An empty path means the data is not associated with any profile. |
| 325 return !profile_path_.empty() && profile_path_ == profile->GetPath().value(); | 325 return !profile_path_.empty() && profile_path_ == profile->GetPath().value(); |
| 326 } | 326 } |
| OLD | NEW |