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 <string> | |
8 | |
7 #include "app/clipboard/scoped_clipboard_writer.h" | 9 #include "app/clipboard/scoped_clipboard_writer.h" |
8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
9 #include "base/pickle.h" | 11 #include "base/pickle.h" |
10 #include "base/string_util.h" | 12 #include "base/string_util.h" |
11 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/bookmarks/bookmark_model.h" | 14 #include "chrome/browser/bookmarks/bookmark_model.h" |
15 #include "chrome/browser/profiles/profile.h" | |
16 #include "chrome/common/url_constants.h" | |
17 #include "net/base/escape.h" | |
18 | |
13 #if defined(OS_MACOSX) | 19 #if defined(OS_MACOSX) |
James Hawkins
2010/12/05 17:58:47
#ifdef includes are supposed to be in order with t
Lei Zhang
2010/12/05 18:22:40
Nope.
http://www.chromium.org/developers/coding-st
| |
14 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 20 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
21 #else | |
22 #include "chrome/browser/browser_process.h" | |
15 #endif | 23 #endif |
16 #include "chrome/browser/profiles/profile.h" | |
17 #include "chrome/common/url_constants.h" | |
18 #include "chrome/browser/browser_process.h" | |
19 #include "net/base/escape.h" | |
20 | 24 |
21 const char* BookmarkNodeData::kClipboardFormatString = | 25 const char* BookmarkNodeData::kClipboardFormatString = |
22 "chromium/x-bookmark-entries"; | 26 "chromium/x-bookmark-entries"; |
23 | 27 |
24 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { | 28 BookmarkNodeData::Element::Element() : is_url(false), id_(0) { |
25 } | 29 } |
26 | 30 |
27 BookmarkNodeData::Element::Element(const BookmarkNode* node) | 31 BookmarkNodeData::Element::Element(const BookmarkNode* node) |
28 : is_url(node->is_url()), | 32 : is_url(node->is_url()), |
29 url(node->GetURL()), | 33 url(node->GetURL()), |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 DCHECK(profile_path_.empty()); | 321 DCHECK(profile_path_.empty()); |
318 | 322 |
319 if (profile) | 323 if (profile) |
320 profile_path_ = profile->GetPath().value(); | 324 profile_path_ = profile->GetPath().value(); |
321 } | 325 } |
322 | 326 |
323 bool BookmarkNodeData::IsFromProfile(Profile* profile) const { | 327 bool BookmarkNodeData::IsFromProfile(Profile* profile) const { |
324 // An empty path means the data is not associated with any profile. | 328 // An empty path means the data is not associated with any profile. |
325 return !profile_path_.empty() && profile_path_ == profile->GetPath().value(); | 329 return !profile_path_.empty() && profile_path_ == profile->GetPath().value(); |
326 } | 330 } |
OLD | NEW |