OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_GDATA_GDATA_PARAMS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_CALLBACK_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_PARAMS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_CALLBACK_H_ |
satorux1
2012/08/08 20:21:19
Sorry to be nit-picky, but the name does not look
| |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" | 17 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" |
18 #include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h" | 18 #include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h" |
19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
20 #include "net/base/io_buffer.h" | 20 #include "net/base/io_buffer.h" |
21 | 21 |
22 namespace gdata { | 22 namespace gdata { |
23 | 23 |
24 class GDataEntry; | 24 class GDataEntry; |
25 struct ResumeUploadResponse; | 25 struct ResumeUploadResponse; |
26 | 26 |
27 // Different callback types for various functionalities in DocumentsService. | 27 // Different callback types for various functionalities in DocumentsService. |
28 | 28 |
29 // Callback type for authentication related DocumentService calls. | |
30 typedef base::Callback<void(GDataErrorCode error, | |
31 const std::string& token)> AuthStatusCallback; | |
32 | |
33 // Callback type for DocumentServiceInterface::GetDocuments. | 29 // Callback type for DocumentServiceInterface::GetDocuments. |
34 // Note: feed_data argument should be passed using base::Passed(&feed_data), not | 30 // Note: feed_data argument should be passed using base::Passed(&feed_data), not |
35 // feed_data.Pass(). | 31 // feed_data.Pass(). |
36 typedef base::Callback<void(GDataErrorCode error, | 32 typedef base::Callback<void(GDataErrorCode error, |
37 scoped_ptr<base::Value> feed_data)> GetDataCallback; | 33 scoped_ptr<base::Value> feed_data)> GetDataCallback; |
38 | 34 |
39 // Callback type for Delete/Move DocumentServiceInterface calls. | 35 // Callback type for Delete/Move DocumentServiceInterface calls. |
40 typedef base::Callback<void(GDataErrorCode error, | 36 typedef base::Callback<void(GDataErrorCode error, |
41 const GURL& document_url)> EntryActionCallback; | 37 const GURL& document_url)> EntryActionCallback; |
42 | 38 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 ~InitiateUploadParams(); | 121 ~InitiateUploadParams(); |
126 | 122 |
127 UploadMode upload_mode; | 123 UploadMode upload_mode; |
128 std::string title; | 124 std::string title; |
129 std::string content_type; | 125 std::string content_type; |
130 int64 content_length; | 126 int64 content_length; |
131 GURL upload_location; | 127 GURL upload_location; |
132 const FilePath& virtual_path; | 128 const FilePath& virtual_path; |
133 }; | 129 }; |
134 | 130 |
135 // Defines set of parameters sent to callback OnProtoLoaded(). | |
136 struct LoadRootFeedParams { | |
137 LoadRootFeedParams( | |
138 FilePath search_file_path, | |
139 bool should_load_from_server, | |
140 const FindEntryCallback& callback); | |
141 ~LoadRootFeedParams(); | |
142 | |
143 FilePath search_file_path; | |
144 bool should_load_from_server; | |
145 std::string proto; | |
146 GDataFileError load_error; | |
147 base::Time last_modified; | |
148 // Time when filesystem began to be loaded from disk. | |
149 base::Time load_start_time; | |
150 const FindEntryCallback callback; | |
151 }; | |
152 | |
153 } // namespace gdata | 131 } // namespace gdata |
154 | 132 |
155 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_PARAMS_H_ | 133 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_CALLBACK_H_ |
OLD | NEW |