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 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 const GetDataCallback& callback) { | 101 const GetDataCallback& callback) { |
102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
103 | 103 |
104 GetDocumentsOperation* operation = | 104 GetDocumentsOperation* operation = |
105 new GetDocumentsOperation(operation_registry(), | 105 new GetDocumentsOperation(operation_registry(), |
106 start_changestamp, | 106 start_changestamp, |
107 search_query, | 107 search_query, |
108 directory_resource_id, | 108 directory_resource_id, |
109 callback); | 109 callback); |
110 if (!url.is_empty()) | 110 if (!url.is_empty()) |
111 operation->SetUrl(url); | 111 operation->SetURL(url); |
112 runner_->StartOperationWithRetry(operation); | 112 runner_->StartOperationWithRetry(operation); |
113 } | 113 } |
114 | 114 |
| 115 void DocumentsService::GetChangelist(const GURL& url, |
| 116 int64 start_changestamp, |
| 117 const GetDataCallback& callback) { |
| 118 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 119 VLOG(1) << "GetChangeList: start_changestamp = " << start_changestamp; |
| 120 |
| 121 GetChangelistOperation* operation = |
| 122 new GetChangelistOperation(operation_registry(), |
| 123 start_changestamp, |
| 124 callback); |
| 125 if (!url.is_empty()) |
| 126 operation->SetURL(url); |
| 127 runner_->StartOperationWithRetry(operation); |
| 128 } |
| 129 |
115 void DocumentsService::GetDocumentEntry(const std::string& resource_id, | 130 void DocumentsService::GetDocumentEntry(const std::string& resource_id, |
116 const GetDataCallback& callback) { | 131 const GetDataCallback& callback) { |
117 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
118 | 133 |
119 GetDocumentEntryOperation* operation = | 134 GetDocumentEntryOperation* operation = |
120 new GetDocumentEntryOperation(operation_registry(), | 135 new GetDocumentEntryOperation(operation_registry(), |
121 resource_id, | 136 resource_id, |
122 callback); | 137 callback); |
123 runner_->StartOperationWithRetry(operation); | 138 runner_->StartOperationWithRetry(operation); |
124 } | 139 } |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 return runner_->auth_service()->HasAccessToken(); | 302 return runner_->auth_service()->HasAccessToken(); |
288 } | 303 } |
289 | 304 |
290 bool DocumentsService::HasRefreshToken() const { | 305 bool DocumentsService::HasRefreshToken() const { |
291 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 306 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
292 | 307 |
293 return runner_->auth_service()->HasRefreshToken(); | 308 return runner_->auth_service()->HasRefreshToken(); |
294 } | 309 } |
295 | 310 |
296 } // namespace gdata | 311 } // namespace gdata |
OLD | NEW |