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

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

Issue 7918001: [Sync] Move ChangeRecord into its own file (change_record.{h,cc}) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 3 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_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/sync/glue/sync_backend_host.h" 9 #include "chrome/browser/sync/glue/sync_backend_host.h"
10 #include "chrome/browser/sync/internal_api/sync_manager.h" 10 #include "chrome/browser/sync/internal_api/change_record.h"
11 11
12 class Profile; 12 class Profile;
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 15
16 class ModelAssociator; 16 class ModelAssociator;
17 class UnrecoverableErrorHandler; 17 class UnrecoverableErrorHandler;
18 18
19 // An interface used to apply changes from the sync model to the browser's 19 // An interface used to apply changes from the sync model to the browser's
20 // native model. This does not currently distinguish between model data types. 20 // native model. This does not currently distinguish between model data types.
(...skipping 12 matching lines...) Expand all
33 // |StartImpl|. 33 // |StartImpl|.
34 void Start(Profile* profile, sync_api::UserShare* share_handle); 34 void Start(Profile* profile, sync_api::UserShare* share_handle);
35 void Stop(); 35 void Stop();
36 virtual bool IsRunning() const; 36 virtual bool IsRunning() const;
37 37
38 // Changes have been applied to the backend model and are ready to be 38 // Changes have been applied to the backend model and are ready to be
39 // applied to the frontend model. See syncapi.h for detailed instructions on 39 // applied to the frontend model. See syncapi.h for detailed instructions on
40 // how to interpret and process |changes|. 40 // how to interpret and process |changes|.
41 virtual void ApplyChangesFromSyncModel( 41 virtual void ApplyChangesFromSyncModel(
42 const sync_api::BaseTransaction* trans, 42 const sync_api::BaseTransaction* trans,
43 const sync_api::SyncManager::ChangeRecord* changes, 43 const sync_api::ImmutableChangeRecordList& changes) = 0;
44 int change_count) = 0;
45 44
46 // The changes found in ApplyChangesFromSyncModel may be too slow to be 45 // The changes found in ApplyChangesFromSyncModel may be too slow to be
47 // performed while holding a [Read/Write]Transaction lock or may interact 46 // performed while holding a [Read/Write]Transaction lock or may interact
48 // with another thread, which might itself be waiting on the transaction lock, 47 // with another thread, which might itself be waiting on the transaction lock,
49 // putting us at risk of deadlock. 48 // putting us at risk of deadlock.
50 // This function is called once the transactional lock is released and it is 49 // This function is called once the transactional lock is released and it is
51 // safe to perform inter-thread or slow I/O operations. Note that not all 50 // safe to perform inter-thread or slow I/O operations. Note that not all
52 // datatypes need this, so we provide an empty default version. 51 // datatypes need this, so we provide an empty default version.
53 virtual void CommitChangesFromSyncModel(); 52 virtual void CommitChangesFromSyncModel();
54 53
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // The sync model we are processing changes from. Non-NULL when |running_| is 86 // The sync model we are processing changes from. Non-NULL when |running_| is
88 // true. 87 // true.
89 sync_api::UserShare* share_handle_; 88 sync_api::UserShare* share_handle_;
90 89
91 DISALLOW_COPY_AND_ASSIGN(ChangeProcessor); 90 DISALLOW_COPY_AND_ASSIGN(ChangeProcessor);
92 }; 91 };
93 92
94 } // namespace browser_sync 93 } // namespace browser_sync
95 94
96 #endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_ 95 #endif // CHROME_BROWSER_SYNC_GLUE_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.cc ('k') | chrome/browser/sync/glue/change_processor_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698