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

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

Issue 59443002: drive: Simplify TruncateOperation with ResourceEntry::local_id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/truncate_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_TRUNCATE_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_TRUNCATE_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_TRUNCATE_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_TRUNCATE_OPERATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Part of Truncate(). Called after EnsureFileDownloadedByPath() is complete. 55 // Part of Truncate(). Called after EnsureFileDownloadedByPath() is complete.
56 void TruncateAfterEnsureFileDownloadedByPath( 56 void TruncateAfterEnsureFileDownloadedByPath(
57 int64 length, 57 int64 length,
58 const FileOperationCallback& callback, 58 const FileOperationCallback& callback,
59 FileError error, 59 FileError error,
60 const base::FilePath& local_file_path, 60 const base::FilePath& local_file_path,
61 scoped_ptr<ResourceEntry> resource_entry); 61 scoped_ptr<ResourceEntry> resource_entry);
62 62
63 // Part of Truncate(). Called after TruncateOnBlockingPool() is complete. 63 // Part of Truncate(). Called after TruncateOnBlockingPool() is complete.
64 void TruncateAfterTruncateOnBlockingPool( 64 void TruncateAfterTruncateOnBlockingPool(
65 const std::string* local_id, 65 const std::string& local_id,
66 const FileOperationCallback& callback, 66 const FileOperationCallback& callback,
67 FileError error); 67 FileError error);
68 68
69 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 69 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
70 OperationObserver* observer_; 70 OperationObserver* observer_;
71 internal::ResourceMetadata* metadata_; 71 internal::ResourceMetadata* metadata_;
72 internal::FileCache* cache_; 72 internal::FileCache* cache_;
73 73
74 scoped_ptr<DownloadOperation> download_operation_; 74 scoped_ptr<DownloadOperation> download_operation_;
75 75
76 // Note: This should remain the last member so it'll be destroyed and 76 // Note: This should remain the last member so it'll be destroyed and
77 // invalidate the weak pointers before any other members are destroyed. 77 // invalidate the weak pointers before any other members are destroyed.
78 base::WeakPtrFactory<TruncateOperation> weak_ptr_factory_; 78 base::WeakPtrFactory<TruncateOperation> weak_ptr_factory_;
79 DISALLOW_COPY_AND_ASSIGN(TruncateOperation); 79 DISALLOW_COPY_AND_ASSIGN(TruncateOperation);
80 }; 80 };
81 81
82 } // namespace file_system 82 } // namespace file_system
83 } // namespace drive 83 } // namespace drive
84 84
85 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_TRUNCATE_OPERATION_H_ 85 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_TRUNCATE_OPERATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/truncate_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698