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

Side by Side Diff: sync/internal_api/sync_core_proxy_impl.h

Issue 272323002: sync: Implement disabling of non blocking types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 7 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 | « sync/internal_api/sync_core.cc ('k') | sync/internal_api/sync_core_proxy_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SYNC_INTERNAL_API_SYNC_CORE_PROXY_IMPL_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_CORE_PROXY_IMPL_H_
6 #define SYNC_INTERNAL_API_SYNC_CORE_PROXY_IMPL_H_ 6 #define SYNC_INTERNAL_API_SYNC_CORE_PROXY_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 22 matching lines...) Expand all
33 // 33 //
34 // This may fail under some unusual circumstances, like shutdown. Due to the 34 // This may fail under some unusual circumstances, like shutdown. Due to the
35 // nature of WeakPtrs and cross-thread communication, the caller will be 35 // nature of WeakPtrs and cross-thread communication, the caller will be
36 // unable to distinguish a slow success from failure. 36 // unable to distinguish a slow success from failure.
37 // 37 //
38 // Must be called from the thread where the data type lives. 38 // Must be called from the thread where the data type lives.
39 virtual void ConnectTypeToCore( 39 virtual void ConnectTypeToCore(
40 syncer::ModelType type, 40 syncer::ModelType type,
41 base::WeakPtr<NonBlockingTypeProcessor> type_processor) OVERRIDE; 41 base::WeakPtr<NonBlockingTypeProcessor> type_processor) OVERRIDE;
42 42
43 // Disables syncing for the given type on the sync thread.
44 virtual void Disconnect(syncer::ModelType type) OVERRIDE;
45
43 virtual scoped_ptr<SyncCoreProxy> Clone() const OVERRIDE; 46 virtual scoped_ptr<SyncCoreProxy> Clone() const OVERRIDE;
44 47
45 private: 48 private:
46 // A SequencedTaskRunner representing the thread where the SyncCore lives. 49 // A SequencedTaskRunner representing the thread where the SyncCore lives.
47 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_; 50 scoped_refptr<base::SequencedTaskRunner> sync_task_runner_;
48 51
49 // The SyncCore this object is wrapping. 52 // The SyncCore this object is wrapping.
50 base::WeakPtr<SyncCore> sync_core_; 53 base::WeakPtr<SyncCore> sync_core_;
51 }; 54 };
52 55
53 } // namespace syncer 56 } // namespace syncer
54 57
55 #endif // SYNC_INTERNAL_API_SYNC_CORE_PROXY_IMPL_H_ 58 #endif // SYNC_INTERNAL_API_SYNC_CORE_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « sync/internal_api/sync_core.cc ('k') | sync/internal_api/sync_core_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698