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

Side by Side Diff: chrome/browser/sync/glue/favicon_cache_unittest.cc

Issue 15701022: [Sync] Add support for sync Persistence Errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move bookmark change into separate patch Created 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/sync/glue/favicon_cache.h" 5 #include "chrome/browser/sync/glue/favicon_cache.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/history/history_notifications.h" 9 #include "chrome/browser/history/history_notifications.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 TestChangeProcessor::~TestChangeProcessor() { 72 TestChangeProcessor::~TestChangeProcessor() {
73 } 73 }
74 74
75 syncer::SyncError TestChangeProcessor::ProcessSyncChanges( 75 syncer::SyncError TestChangeProcessor::ProcessSyncChanges(
76 const tracked_objects::Location& from_here, 76 const tracked_objects::Location& from_here,
77 const syncer::SyncChangeList& change_list) { 77 const syncer::SyncChangeList& change_list) {
78 if (erroneous_) { 78 if (erroneous_) {
79 return syncer::SyncError( 79 return syncer::SyncError(
80 FROM_HERE, "Some error.", change_list[0].sync_data().GetDataType()); 80 FROM_HERE,
81 syncer::SyncError::DATATYPE_ERROR,
82 "Some error.",
83 change_list[0].sync_data().GetDataType());
81 } 84 }
82 85
83 change_list_.insert(change_list_.end(), 86 change_list_.insert(change_list_.end(),
84 change_list.begin(), 87 change_list.begin(),
85 change_list.end()); 88 change_list.end());
86 change_map_.erase(change_map_.begin(), change_map_.end()); 89 change_map_.erase(change_map_.begin(), change_map_.end());
87 for (syncer::SyncChangeList::const_iterator iter = change_list.begin(); 90 for (syncer::SyncChangeList::const_iterator iter = change_list.begin();
88 iter != change_list.end(); ++iter) { 91 iter != change_list.end(); ++iter) {
89 change_map_[iter->sync_data().GetTitle()] = *iter; 92 change_map_[iter->sync_data().GetTitle()] = *iter;
90 } 93 }
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 EXPECT_NE(changes[1].sync_data().GetSpecifics().favicon_tracking(). 1570 EXPECT_NE(changes[1].sync_data().GetSpecifics().favicon_tracking().
1568 last_visit_time_ms(), 0); 1571 last_visit_time_ms(), 0);
1569 } 1572 }
1570 } 1573 }
1571 1574
1572 EXPECT_EQ(0U, GetTaskCount()); 1575 EXPECT_EQ(0U, GetTaskCount());
1573 EXPECT_EQ((unsigned long)kFaviconBatchSize, GetFaviconCount()); 1576 EXPECT_EQ((unsigned long)kFaviconBatchSize, GetFaviconCount());
1574 } 1577 }
1575 1578
1576 } // namespace browser_sync 1579 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/favicon_cache.cc ('k') | chrome/browser/sync/glue/frontend_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698