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

Side by Side Diff: chrome/browser/bookmarks/bookmark_node_data.h

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile (racing with incoming CLs) Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_NODE_DATA_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_NODE_DATA_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_NODE_DATA_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_NODE_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 14
15 #if defined(TOOLKIT_VIEWS) 15 #if defined(TOOLKIT_VIEWS)
16 #include "ui/base/dragdrop/os_exchange_data.h" 16 #include "ui/base/dragdrop/os_exchange_data.h"
17 #endif 17 #endif
18 18
19 class BookmarkNode; 19 class BookmarkNode;
20 class Pickle; 20 class Pickle;
21 class PickleIterator;
21 class Profile; 22 class Profile;
22 23
23 // BookmarkNodeData is used to represent the following: 24 // BookmarkNodeData is used to represent the following:
24 // 25 //
25 // . A single URL. 26 // . A single URL.
26 // . A single node from the bookmark model. 27 // . A single node from the bookmark model.
27 // . A set of nodes from the bookmark model. 28 // . A set of nodes from the bookmark model.
28 // 29 //
29 // BookmarkNodeData is used by bookmark related views to represent a dragged 30 // BookmarkNodeData is used by bookmark related views to represent a dragged
30 // bookmark or bookmarks. 31 // bookmark or bookmarks.
(...skipping 26 matching lines...) Expand all
57 // Children, only used for non-URL nodes. 58 // Children, only used for non-URL nodes.
58 std::vector<Element> children; 59 std::vector<Element> children;
59 60
60 int64 id() { return id_; } 61 int64 id() { return id_; }
61 62
62 private: 63 private:
63 friend struct BookmarkNodeData; 64 friend struct BookmarkNodeData;
64 65
65 // For reading/writing this Element. 66 // For reading/writing this Element.
66 void WriteToPickle(Pickle* pickle) const; 67 void WriteToPickle(Pickle* pickle) const;
67 bool ReadFromPickle(Pickle* pickle, void** iterator); 68 bool ReadFromPickle(Pickle* pickle, PickleIterator* iterator);
68 69
69 // ID of the node. 70 // ID of the node.
70 int64 id_; 71 int64 id_;
71 }; 72 };
72 73
73 BookmarkNodeData(); 74 BookmarkNodeData();
74 75
75 #if defined(TOOLKIT_VIEWS) 76 #if defined(TOOLKIT_VIEWS)
76 static ui::OSExchangeData::CustomFormat GetBookmarkCustomFormat(); 77 static ui::OSExchangeData::CustomFormat GetBookmarkCustomFormat();
77 #endif 78 #endif
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 static const char* kClipboardFormatString; 157 static const char* kClipboardFormatString;
157 158
158 static bool ClipboardContainsBookmarks(); 159 static bool ClipboardContainsBookmarks();
159 160
160 private: 161 private:
161 // Path of the profile we originated from. 162 // Path of the profile we originated from.
162 FilePath profile_path_; 163 FilePath profile_path_;
163 }; 164 };
164 165
165 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_NODE_DATA_H_ 166 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_NODE_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.cc ('k') | chrome/browser/bookmarks/bookmark_node_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698