Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / sync_file_system / local_change_processor.h
blob75f8ba0346a624dce28d7d3929074a11f3694bb5
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CHANGE_PROCESSOR_H_
8 #include "base/callback_forward.h"
9 #include "chrome/browser/sync_file_system/sync_callbacks.h"
11 namespace storage {
12 class FileSystemURL;
15 namespace sync_file_system {
17 class FileChange;
19 // Represents an interface to process one local change and applies
20 // it to the remote server.
21 // This interface is to be implemented/backed by RemoteSyncFileService.
22 class LocalChangeProcessor {
23 public:
24 LocalChangeProcessor() {}
25 virtual ~LocalChangeProcessor() {}
27 // This is called to apply the local |change|. If the change type is
28 // ADD_OR_UPDATE for a file, |local_file_path| points to a local file
29 // path that contains the latest file image whose file metadata is
30 // |local_file_metadata|.
31 // When SYNC_STATUS_HAS_CONFLICT is returned the implementation should
32 // notify the backing RemoteFileSyncService of the existence of conflict
33 // (as the remote service is supposed to maintain a list of conflict files).
34 virtual void ApplyLocalChange(const FileChange& change,
35 const base::FilePath& local_file_path,
36 const SyncFileMetadata& local_file_metadata,
37 const storage::FileSystemURL& url,
38 const SyncStatusCallback& callback) = 0;
40 private:
41 DISALLOW_COPY_AND_ASSIGN(LocalChangeProcessor);
44 } // namespace sync_file_system
46 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CHANGE_PROCESSOR_H_