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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/open_file_operation.h

Issue 23816002: drive: Stop using resource ID to access local metadata in OpenFileOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new Created 7 years, 2 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/chromeos/drive/file_system/open_file_operation.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHROMEOS_DRIVE_FILE_SYSTEM_OPEN_FILE_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPEN_FILE_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPEN_FILE_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPEN_FILE_OPERATION_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 FileError error); 65 FileError error);
66 66
67 // Part of OpenFile(). Called after file downloading is completed. 67 // Part of OpenFile(). Called after file downloading is completed.
68 void OpenFileAfterFileDownloaded(const OpenFileCallback& callback, 68 void OpenFileAfterFileDownloaded(const OpenFileCallback& callback,
69 FileError error, 69 FileError error,
70 const base::FilePath& local_file_path, 70 const base::FilePath& local_file_path,
71 scoped_ptr<ResourceEntry> entry); 71 scoped_ptr<ResourceEntry> entry);
72 72
73 // Part of OpenFile(). Called after marking the cache file dirty. 73 // Part of OpenFile(). Called after marking the cache file dirty.
74 void OpenFileAfterMarkDirty(const base::FilePath& local_file_path, 74 void OpenFileAfterMarkDirty(const base::FilePath& local_file_path,
75 const std::string& resource_id, 75 const std::string& local_id,
76 const OpenFileCallback& callback, 76 const OpenFileCallback& callback,
77 FileError error); 77 FileError error);
78 78
79 // Closes the file with |resource_id|. 79 // Closes the file with |local_id|.
80 void CloseFile(const std::string& resource_id); 80 void CloseFile(const std::string& local_id);
81 81
82 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 82 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
83 OperationObserver* observer_; 83 OperationObserver* observer_;
84 internal::FileCache* cache_; 84 internal::FileCache* cache_;
85 85
86 scoped_ptr<CreateFileOperation> create_file_operation_; 86 scoped_ptr<CreateFileOperation> create_file_operation_;
87 scoped_ptr<DownloadOperation> download_operation_; 87 scoped_ptr<DownloadOperation> download_operation_;
88 88
89 // The map from resource id for an opened file to the number how many times 89 // The map from local id for an opened file to the number how many times
90 // the file is opened. 90 // the file is opened.
91 std::map<std::string, int> open_files_; 91 std::map<std::string, int> open_files_;
92 92
93 // Note: This should remain the last member so it'll be destroyed and 93 // Note: This should remain the last member so it'll be destroyed and
94 // invalidate its weak pointers before any other members are destroyed. 94 // invalidate its weak pointers before any other members are destroyed.
95 base::WeakPtrFactory<OpenFileOperation> weak_ptr_factory_; 95 base::WeakPtrFactory<OpenFileOperation> weak_ptr_factory_;
96 DISALLOW_COPY_AND_ASSIGN(OpenFileOperation); 96 DISALLOW_COPY_AND_ASSIGN(OpenFileOperation);
97 }; 97 };
98 98
99 } // namespace file_system 99 } // namespace file_system
100 } // namespace drive 100 } // namespace drive
101 101
102 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPEN_FILE_OPERATION_H_ 102 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPEN_FILE_OPERATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/open_file_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698