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

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

Issue 114055: We need to save bookmarks file when the persist_ids settings changes... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_STORAGE_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 BookmarkNode* bb_node() { return bb_node_.get(); } 60 BookmarkNode* bb_node() { return bb_node_.get(); }
61 BookmarkNode* other_folder_node() { return other_folder_node_.get(); } 61 BookmarkNode* other_folder_node() { return other_folder_node_.get(); }
62 BookmarkIndex* index() { return index_.get(); } 62 BookmarkIndex* index() { return index_.get(); }
63 63
64 // Max id of the nodes. 64 // Max id of the nodes.
65 void set_max_id(int max_id) { max_id_ = max_id; } 65 void set_max_id(int max_id) { max_id_ = max_id; }
66 int max_id() const { return max_id_; } 66 int max_id() const { return max_id_; }
67 67
68 // Computed checksum.
69 void set_computed_checksum(const std::string& value) {
70 computed_checksum_ = value;
71 }
72 const std::string& computed_checksum() const { return computed_checksum_; }
73
74 // Stored checksum.
75 void set_stored_checksum(const std::string& value) {
76 stored_checksum_ = value;
77 }
78 const std::string& stored_checksum() const { return stored_checksum_; }
79
68 private: 80 private:
69 scoped_ptr<BookmarkNode> bb_node_; 81 scoped_ptr<BookmarkNode> bb_node_;
70 scoped_ptr<BookmarkNode> other_folder_node_; 82 scoped_ptr<BookmarkNode> other_folder_node_;
71 scoped_ptr<BookmarkIndex> index_; 83 scoped_ptr<BookmarkIndex> index_;
72 int max_id_; 84 int max_id_;
85 std::string computed_checksum_;
86 std::string stored_checksum_;
73 87
74 DISALLOW_COPY_AND_ASSIGN(LoadDetails); 88 DISALLOW_COPY_AND_ASSIGN(LoadDetails);
75 }; 89 };
76 90
77 // Creates a BookmarkStorage for the specified model 91 // Creates a BookmarkStorage for the specified model
78 BookmarkStorage(Profile* profile, BookmarkModel* model); 92 BookmarkStorage(Profile* profile, BookmarkModel* model);
79 ~BookmarkStorage(); 93 ~BookmarkStorage();
80 94
81 // Loads the bookmarks into the model, notifying the model when done. This 95 // Loads the bookmarks into the model, notifying the model when done. This
82 // takes ownership of |details|. See LoadDetails for details. 96 // takes ownership of |details|. See LoadDetails for details.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Path to temporary file created during migrating bookmarks from history. 163 // Path to temporary file created during migrating bookmarks from history.
150 const FilePath tmp_history_path_; 164 const FilePath tmp_history_path_;
151 165
152 // See class description of LoadDetails for details on this. 166 // See class description of LoadDetails for details on this.
153 scoped_ptr<LoadDetails> details_; 167 scoped_ptr<LoadDetails> details_;
154 168
155 DISALLOW_COPY_AND_ASSIGN(BookmarkStorage); 169 DISALLOW_COPY_AND_ASSIGN(BookmarkStorage);
156 }; 170 };
157 171
158 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_ 172 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698