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

Side by Side Diff: sync/internal_api/sync_rollback_manager_base.cc

Issue 374183003: Two fixes regarding to bookmark backup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update test Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sync/internal_api/sync_rollback_manager_base.h" 5 #include "sync/internal_api/sync_rollback_manager_base.h"
6 6
7 #include "sync/internal_api/public/base/model_type.h" 7 #include "sync/internal_api/public/base/model_type.h"
8 #include "sync/internal_api/public/internal_components_factory.h" 8 #include "sync/internal_api/public/internal_components_factory.h"
9 #include "sync/internal_api/public/read_node.h" 9 #include "sync/internal_api/public/read_node.h"
10 #include "sync/internal_api/public/read_transaction.h" 10 #include "sync/internal_api/public/read_transaction.h"
11 #include "sync/internal_api/public/write_transaction.h" 11 #include "sync/internal_api/public/write_transaction.h"
12 #include "sync/syncable/directory_backing_store.h" 12 #include "sync/syncable/directory_backing_store.h"
13 #include "sync/syncable/mutable_entry.h" 13 #include "sync/syncable/mutable_entry.h"
14 14
15 namespace { 15 namespace {
16 16
17 // Permanent bookmark folders as defined in bookmark_model_associator.cc. 17 // Permanent bookmark folders as defined in bookmark_model_associator.cc.
18 // No mobile bookmarks because they only exists with sync enabled.
18 const char kBookmarkBarTag[] = "bookmark_bar"; 19 const char kBookmarkBarTag[] = "bookmark_bar";
19 const char kMobileBookmarksTag[] = "synced_bookmarks";
20 const char kOtherBookmarksTag[] = "other_bookmarks"; 20 const char kOtherBookmarksTag[] = "other_bookmarks";
21 21
22 class DummyEntryptionHandler : public syncer::SyncEncryptionHandler { 22 class DummyEntryptionHandler : public syncer::SyncEncryptionHandler {
23 virtual void AddObserver(Observer* observer) OVERRIDE {} 23 virtual void AddObserver(Observer* observer) OVERRIDE {}
24 virtual void RemoveObserver(Observer* observer) OVERRIDE {} 24 virtual void RemoveObserver(Observer* observer) OVERRIDE {}
25 virtual void Init() OVERRIDE {} 25 virtual void Init() OVERRIDE {}
26 virtual void SetEncryptionPassphrase(const std::string& passphrase, 26 virtual void SetEncryptionPassphrase(const std::string& passphrase,
27 bool is_explicit) OVERRIDE {} 27 bool is_explicit) OVERRIDE {}
28 virtual void SetDecryptionPassphrase(const std::string& passphrase) 28 virtual void SetDecryptionPassphrase(const std::string& passphrase)
29 OVERRIDE {} 29 OVERRIDE {}
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 ModelTypeSet to_journal, 113 ModelTypeSet to_journal,
114 ModelTypeSet to_unapply, 114 ModelTypeSet to_unapply,
115 const ModelSafeRoutingInfo& new_routing_info, 115 const ModelSafeRoutingInfo& new_routing_info,
116 const base::Closure& ready_task, 116 const base::Closure& ready_task,
117 const base::Closure& retry_task) { 117 const base::Closure& retry_task) {
118 for (ModelTypeSet::Iterator type = to_download.First(); 118 for (ModelTypeSet::Iterator type = to_download.First();
119 type.Good(); type.Inc()) { 119 type.Good(); type.Inc()) {
120 if (InitTypeRootNode(type.Get())) { 120 if (InitTypeRootNode(type.Get())) {
121 if (type.Get() == BOOKMARKS) { 121 if (type.Get() == BOOKMARKS) {
122 InitBookmarkFolder(kBookmarkBarTag); 122 InitBookmarkFolder(kBookmarkBarTag);
123 InitBookmarkFolder(kMobileBookmarksTag);
124 InitBookmarkFolder(kOtherBookmarksTag); 123 InitBookmarkFolder(kOtherBookmarksTag);
125 } 124 }
126 } 125 }
127 } 126 }
128 127
129 ready_task.Run(); 128 ready_task.Run();
130 } 129 }
131 130
132 void SyncRollbackManagerBase::OnInvalidatorStateChange(InvalidatorState state) { 131 void SyncRollbackManagerBase::OnInvalidatorStateChange(InvalidatorState state) {
133 } 132 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 339
341 void SyncRollbackManagerBase::UnregisterDirectoryTypeDebugInfoObserver( 340 void SyncRollbackManagerBase::UnregisterDirectoryTypeDebugInfoObserver(
342 syncer::TypeDebugInfoObserver* observer) {} 341 syncer::TypeDebugInfoObserver* observer) {}
343 342
344 bool SyncRollbackManagerBase::HasDirectoryTypeDebugInfoObserver( 343 bool SyncRollbackManagerBase::HasDirectoryTypeDebugInfoObserver(
345 syncer::TypeDebugInfoObserver* observer) { return false; } 344 syncer::TypeDebugInfoObserver* observer) { return false; }
346 345
347 void SyncRollbackManagerBase::RequestEmitDebugInfo() {} 346 void SyncRollbackManagerBase::RequestEmitDebugInfo() {}
348 347
349 } // namespace syncer 348 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_backup_manager.cc ('k') | sync/internal_api/sync_rollback_manager_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698