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

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

Issue 7655055: [Sync] Make BackendMigrator not wait for full sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 years, 4 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) 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 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // For convenience, checks if initialization state is INITIALIZED. 558 // For convenience, checks if initialization state is INITIALIZED.
559 bool initialized() const { return initialization_state_ == INITIALIZED; } 559 bool initialized() const { return initialization_state_ == INITIALIZED; }
560 560
561 // A thread where all the sync operations happen. 561 // A thread where all the sync operations happen.
562 base::Thread sync_thread_; 562 base::Thread sync_thread_;
563 563
564 // A reference to the MessageLoop used to construct |this|, so we know how 564 // A reference to the MessageLoop used to construct |this|, so we know how
565 // to safely talk back to the SyncFrontend. 565 // to safely talk back to the SyncFrontend.
566 MessageLoop* const frontend_loop_; 566 MessageLoop* const frontend_loop_;
567 567
568 Profile* profile_; 568 Profile* const profile_;
569
570 // Name used for debugging (set from profile_->GetDebugName()).
571 const std::string name_;
569 572
570 sync_notifier::SyncNotifierFactory sync_notifier_factory_; 573 sync_notifier::SyncNotifierFactory sync_notifier_factory_;
571 574
572 // This is state required to implement ModelSafeWorkerRegistrar. 575 // This is state required to implement ModelSafeWorkerRegistrar.
573 struct { 576 struct {
574 // We maintain ownership of all workers. In some cases, we need to ensure 577 // We maintain ownership of all workers. In some cases, we need to ensure
575 // shutdown occurs in an expected sequence by Stop()ing certain workers. 578 // shutdown occurs in an expected sequence by Stop()ing certain workers.
576 // They are guaranteed to be valid because we only destroy elements of 579 // They are guaranteed to be valid because we only destroy elements of
577 // |workers_| after the syncapi has been destroyed. Unless a worker is no 580 // |workers_| after the syncapi has been destroyed. Unless a worker is no
578 // longer needed because all types that get routed to it have been disabled 581 // longer needed because all types that get routed to it have been disabled
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 615
613 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. 616 // UI-thread cache of the last SyncSessionSnapshot received from syncapi.
614 scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_; 617 scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_;
615 618
616 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 619 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
617 }; 620 };
618 621
619 } // namespace browser_sync 622 } // namespace browser_sync
620 623
621 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 624 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698