Evict resources from resource pool after timeout
[chromium-blink-merge.git] / components / drive / change_list_loader_observer.h
blob0a9e810606edd8bf672b4d61d106103d3a91e60e
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 COMPONENTS_DRIVE_CHANGE_LIST_LOADER_OBSERVER_H_
6 #define COMPONENTS_DRIVE_CHANGE_LIST_LOADER_OBSERVER_H_
8 namespace base {
9 class FilePath;
10 } // namespace base
12 namespace drive {
13 class FileChange;
14 namespace internal {
16 // Interface for classes that need to observe events from ChangeListLoader.
17 // All events are notified on UI thread.
18 class ChangeListLoaderObserver {
19 public:
20 // Triggered when the content of a directory is reloaded. The content may
21 // changed. |directory_path| is a virtual directory path representing the
22 // reloaded directory.
23 virtual void OnDirectoryReloaded(const base::FilePath& directory_path) {}
25 // Triggered when content(s) in drive has been changed.
26 virtual void OnFileChanged(const FileChange& changed_files) {}
28 // Triggered when loading from the server is complete.
29 virtual void OnLoadFromServerComplete() {}
31 // Triggered when loading is complete for the first time, either from the
32 // the server or the cache. To be precise, for the latter case, we do not
33 // load anything from the cache. We just check that the resource metadata
34 // is stored locally thus can be used.
35 virtual void OnInitialLoadComplete() {}
37 protected:
38 virtual ~ChangeListLoaderObserver() {}
41 } // namespace internal
42 } // namespace drive
44 #endif // COMPONENTS_DRIVE_CHANGE_LIST_LOADER_OBSERVER_H_