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

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

Issue 8295017: [Sync] Support open tabs experiment enabling before sync setup completion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sync/glue/sync_backend_host.h" 7 #include "chrome/browser/sync/glue/sync_backend_host.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 SVLOG(1) << "Got snapshot " << snapshot->ToString(); 813 SVLOG(1) << "Got snapshot " << snapshot->ToString();
814 814
815 const syncable::ModelTypeSet& to_migrate = 815 const syncable::ModelTypeSet& to_migrate =
816 snapshot->syncer_status.types_needing_local_migration; 816 snapshot->syncer_status.types_needing_local_migration;
817 if (!to_migrate.empty()) 817 if (!to_migrate.empty())
818 host_->frontend_->OnMigrationNeededForTypes(to_migrate); 818 host_->frontend_->OnMigrationNeededForTypes(to_migrate);
819 819
820 // Process any changes to the datatypes we're syncing. 820 // Process any changes to the datatypes we're syncing.
821 // TODO(sync): add support for removing types. 821 // TODO(sync): add support for removing types.
822 syncable::ModelTypeSet to_add; 822 syncable::ModelTypeSet to_add;
823 if (host_->initialized() && 823 if (sync_manager()->ReceivedExperimentalTypes(&to_add)) {
akalin 2011/10/14 23:18:48 hmm. Thinking about this, I think it's cleaner to
Nicolas Zea 2011/10/15 00:31:35 Done.
824 sync_manager()->ReceivedExperimentalTypes(&to_add)) {
825 host_->frontend_->OnDataTypesChanged(to_add); 824 host_->frontend_->OnDataTypesChanged(to_add);
826 } 825 }
827 826
828 // If we are waiting for a configuration change, check here to see 827 // If we are waiting for a configuration change, check here to see
829 // if this sync cycle has initialized all of the types we've been 828 // if this sync cycle has initialized all of the types we've been
830 // waiting for. 829 // waiting for.
831 if (host_->pending_download_state_.get()) { 830 if (host_->pending_download_state_.get()) {
832 scoped_ptr<PendingConfigureDataTypesState> state( 831 scoped_ptr<PendingConfigureDataTypesState> state(
833 host_->pending_download_state_.release()); 832 host_->pending_download_state_.release());
834 DCHECK( 833 DCHECK(
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 FROM_HERE, 1035 FROM_HERE,
1037 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption, 1036 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption,
1038 core_.get(), sync_thread_done_callback)); 1037 core_.get(), sync_thread_done_callback));
1039 } 1038 }
1040 1039
1041 #undef SVLOG 1040 #undef SVLOG
1042 1041
1043 #undef SLOG 1042 #undef SLOG
1044 1043
1045 } // namespace browser_sync 1044 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698