OLD | NEW |
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_DRIVE_URL_REQUEST_JOB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 class URLRequest; | 26 class URLRequest; |
27 } // namespace net | 27 } // namespace net |
28 | 28 |
29 namespace drive { | 29 namespace drive { |
30 | 30 |
31 class DriveFileStreamReader; | 31 class DriveFileStreamReader; |
32 class FileSystemInterface; | 32 class FileSystemInterface; |
33 class ResourceEntry; | 33 class ResourceEntry; |
34 | 34 |
35 // DriveURLRequestJob is the gateway between network-level drive:... | 35 // DriveURLRequestJob is the gateway between network-level drive:... |
36 // requests for drive resources and DriveFileSytem. It exposes content URLs | 36 // requests for drive resources and FileSystem. It exposes content URLs |
37 // formatted as drive:<drive-file-path>. | 37 // formatted as drive:<drive-file-path>. |
38 // The methods should be run on IO thread, and the operations to communicate | 38 // The methods should be run on IO thread, and the operations to communicate |
39 // with a locally cached file will run on |file_task_runner|. | 39 // with a locally cached file will run on |file_task_runner|. |
40 class DriveURLRequestJob : public net::URLRequestJob { | 40 class DriveURLRequestJob : public net::URLRequestJob { |
41 public: | 41 public: |
42 | 42 |
43 // Callback to return the FileSystemInterface instance. This is an | 43 // Callback to return the FileSystemInterface instance. This is an |
44 // injecting point for testing. | 44 // injecting point for testing. |
45 // Note that the callback will be copied between threads (IO and UI), and | 45 // Note that the callback will be copied between threads (IO and UI), and |
46 // will be called on UI thread. | 46 // will be called on UI thread. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // This should remain the last member so it'll be destroyed first and | 85 // This should remain the last member so it'll be destroyed first and |
86 // invalidate its weak pointers before other members are destroyed. | 86 // invalidate its weak pointers before other members are destroyed. |
87 base::WeakPtrFactory<DriveURLRequestJob> weak_ptr_factory_; | 87 base::WeakPtrFactory<DriveURLRequestJob> weak_ptr_factory_; |
88 DISALLOW_COPY_AND_ASSIGN(DriveURLRequestJob); | 88 DISALLOW_COPY_AND_ASSIGN(DriveURLRequestJob); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace drive | 91 } // namespace drive |
92 | 92 |
93 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 93 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
OLD | NEW |