| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ | 6 #define CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 content::BrowserContext* browser_context); | 114 content::BrowserContext* browser_context); |
| 115 | 115 |
| 116 // For testing: clears partner bookmark model data. | 116 // For testing: clears partner bookmark model data. |
| 117 static void ClearPartnerModelForTesting(); | 117 static void ClearPartnerModelForTesting(); |
| 118 | 118 |
| 119 // For testing: re-enables partner bookmarks editing. | 119 // For testing: re-enables partner bookmarks editing. |
| 120 static void EnablePartnerBookmarksEditing(); | 120 static void EnablePartnerBookmarksEditing(); |
| 121 | 121 |
| 122 private: | 122 private: |
| 123 explicit PartnerBookmarksShim(PrefService* prefs); | 123 explicit PartnerBookmarksShim(PrefService* prefs); |
| 124 virtual ~PartnerBookmarksShim(); | 124 ~PartnerBookmarksShim() override; |
| 125 | 125 |
| 126 const BookmarkNode* GetNodeByID(const BookmarkNode* parent, int64 id) const; | 126 const BookmarkNode* GetNodeByID(const BookmarkNode* parent, int64 id) const; |
| 127 void ReloadNodeMapping(); | 127 void ReloadNodeMapping(); |
| 128 void SaveNodeMapping(); | 128 void SaveNodeMapping(); |
| 129 | 129 |
| 130 scoped_ptr<BookmarkNode> partner_bookmarks_root_; | 130 scoped_ptr<BookmarkNode> partner_bookmarks_root_; |
| 131 PrefService* prefs_; | 131 PrefService* prefs_; |
| 132 NodeRenamingMap node_rename_remove_map_; | 132 NodeRenamingMap node_rename_remove_map_; |
| 133 | 133 |
| 134 // The observers. | 134 // The observers. |
| 135 ObserverList<Observer> observers_; | 135 ObserverList<Observer> observers_; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShim); | 137 DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShim); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ | 140 #endif // CHROME_BROWSER_ANDROID_BOOKMARKS_PARTNER_BOOKMARKS_SHIM_H_ |
| OLD | NEW |