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

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

Issue 10454105: sync: Refactor per-datatype throttling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 8 years, 6 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/sync_ui_util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 9 #include <string>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 private: 137 private:
138 DISALLOW_COPY_AND_ASSIGN(SyncFrontend); 138 DISALLOW_COPY_AND_ASSIGN(SyncFrontend);
139 }; 139 };
140 140
141 // A UI-thread safe API into the sync backend that "hosts" the top-level 141 // A UI-thread safe API into the sync backend that "hosts" the top-level
142 // syncapi element, the SyncManager, on its own thread. This class handles 142 // syncapi element, the SyncManager, on its own thread. This class handles
143 // dispatch of potentially blocking calls to appropriate threads and ensures 143 // dispatch of potentially blocking calls to appropriate threads and ensures
144 // that the SyncFrontend is only accessed on the UI loop. 144 // that the SyncFrontend is only accessed on the UI loop.
145 class SyncBackendHost : public BackendDataTypeConfigurer { 145 class SyncBackendHost : public BackendDataTypeConfigurer {
146 public: 146 public:
147 typedef sync_api::SyncManager::Status Status; 147 typedef sync_api::SyncStatus Status;
148 148
149 // Create a SyncBackendHost with a reference to the |frontend| that 149 // Create a SyncBackendHost with a reference to the |frontend| that
150 // it serves and communicates to via the SyncFrontend interface (on 150 // it serves and communicates to via the SyncFrontend interface (on
151 // the same thread it used to call the constructor). Must outlive 151 // the same thread it used to call the constructor). Must outlive
152 // |sync_prefs| and |invalidator_storage|. 152 // |sync_prefs| and |invalidator_storage|.
153 SyncBackendHost( 153 SyncBackendHost(
154 const std::string& name, 154 const std::string& name,
155 Profile* profile, 155 Profile* profile,
156 const base::WeakPtr<SyncPrefs>& sync_prefs, 156 const base::WeakPtr<SyncPrefs>& sync_prefs,
157 // TODO(tim): Temporary, remove when bug 124137 finished. 157 // TODO(tim): Temporary, remove when bug 124137 finished.
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 524
525 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. 525 // UI-thread cache of the last SyncSessionSnapshot received from syncapi.
526 sessions::SyncSessionSnapshot last_snapshot_; 526 sessions::SyncSessionSnapshot last_snapshot_;
527 527
528 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 528 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
529 }; 529 };
530 530
531 } // namespace browser_sync 531 } // namespace browser_sync
532 532
533 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 533 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698