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

Unified Diff: sync/test/fake_server/fake_server.cc

Issue 1414203016: [Sync] Introduce GmsCoreSyncListener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetCustomPassphraseKey declaration. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/test/fake_server/fake_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/fake_server.cc
diff --git a/sync/test/fake_server/fake_server.cc b/sync/test/fake_server/fake_server.cc
index 9a464578c3ca33d15bab81c8c819fd5aa89e775b..01f5a16f7b76875db6679d24e7e075a51aedd3b0 100644
--- a/sync/test/fake_server/fake_server.cc
+++ b/sync/test/fake_server/fake_server.cc
@@ -169,14 +169,18 @@ FakeServer::FakeServer() : version_(0),
request_counter_(0),
network_enabled_(true),
weak_ptr_factory_(this) {
+ Init();
+}
+
+FakeServer::~FakeServer() {}
+
+void FakeServer::Init() {
keystore_keys_.push_back(kDefaultKeystoreKey);
const bool create_result = CreateDefaultPermanentItems();
DCHECK(create_result) << "Permanent items were not created successfully.";
}
-FakeServer::~FakeServer() {}
-
bool FakeServer::CreatePermanentBookmarkFolder(const std::string& server_tag,
const std::string& name) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -590,6 +594,7 @@ void FakeServer::ClearServerData() {
entities_.clear();
keystore_keys_.clear();
++store_birthday_;
+ Init();
}
void FakeServer::SetAuthenticated() {
« no previous file with comments | « sync/test/fake_server/fake_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698