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

Unified Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 6465005: [Sync] Initial support for encrypting any datatype (no UI hookup yet). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + small fix Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/session_model_associator.cc
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index cad5b987ad72d7a11d06b4acdbb31fcb0a64f62a..75c7a0d6978733f724ea9b83db02b232088805e2 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -40,6 +40,16 @@ SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service)
DCHECK(sync_service_);
}
+SessionModelAssociator::SessionModelAssociator(ProfileSyncService* sync_service,
+ bool setup_for_test)
+ : tab_pool_(sync_service),
+ local_session_syncid_(sync_api::kInvalidId),
+ sync_service_(sync_service),
+ setup_for_test_(setup_for_test) {
+ DCHECK(CalledOnValidThread());
+ DCHECK(sync_service_);
+}
+
SessionModelAssociator::~SessionModelAssociator() {
DCHECK(CalledOnValidThread());
}
@@ -493,8 +503,7 @@ bool SessionModelAssociator::AssociateForeignSpecifics(
const int64 modification_time) {
DCHECK(CalledOnValidThread());
std::string foreign_session_tag = specifics.session_tag();
- DCHECK(foreign_session_tag != GetCurrentMachineTag() ||
- sync_service_->cros_user() == "test user"); // For tests.
+ DCHECK(foreign_session_tag != GetCurrentMachineTag() || setup_for_test_);
if (specifics.has_header()) {
// Read in the header data for this foreign session.
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.h ('k') | chrome/browser/sync/glue/session_model_associator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698