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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_operations.cc

Issue 10836125: Add GetChangelist operation for Drive V2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SetURL() and specify url in the constructor. Created 8 years, 4 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
OLDNEW
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_operations.h" 5 #include "chrome/browser/chromeos/gdata/gdata_operations.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/gdata/gdata_util.h" 10 #include "chrome/browser/chromeos/gdata/gdata_util.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 } // namespace 150 } // namespace
151 151
152 namespace gdata { 152 namespace gdata {
153 153
154 //============================ GetDocumentsOperation =========================== 154 //============================ GetDocumentsOperation ===========================
155 155
156 GetDocumentsOperation::GetDocumentsOperation( 156 GetDocumentsOperation::GetDocumentsOperation(
157 GDataOperationRegistry* registry, 157 GDataOperationRegistry* registry,
158 const GURL& url,
158 int start_changestamp, 159 int start_changestamp,
159 const std::string& search_string, 160 const std::string& search_string,
160 const std::string& directory_resource_id, 161 const std::string& directory_resource_id,
161 const GetDataCallback& callback) 162 const GetDataCallback& callback)
162 : GetDataOperation(registry, callback), 163 : GetDataOperation(registry, callback),
164 override_url_(url),
163 start_changestamp_(start_changestamp), 165 start_changestamp_(start_changestamp),
164 search_string_(search_string), 166 search_string_(search_string),
165 directory_resource_id_(directory_resource_id) { 167 directory_resource_id_(directory_resource_id) {
166 } 168 }
167 169
168 GetDocumentsOperation::~GetDocumentsOperation() {} 170 GetDocumentsOperation::~GetDocumentsOperation() {}
169 171
170 void GetDocumentsOperation::SetUrl(const GURL& url) {
171 override_url_ = url;
172 }
173
174 GURL GetDocumentsOperation::GetURL() const { 172 GURL GetDocumentsOperation::GetURL() const {
175 int max_docs = search_string_.empty() ? kMaxDocumentsPerFeed : 173 int max_docs = search_string_.empty() ? kMaxDocumentsPerFeed :
176 kMaxDocumentsPerSearchFeed; 174 kMaxDocumentsPerSearchFeed;
177 175
178 if (!override_url_.is_empty()) 176 if (!override_url_.is_empty())
179 return AddFeedUrlParams(override_url_, 177 return AddFeedUrlParams(override_url_,
180 max_docs, 178 max_docs,
181 0, 179 0,
182 search_string_); 180 search_string_);
183 181
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS); 925 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS);
928 } 926 }
929 927
930 void GetContactPhotoOperation::RunCallbackOnPrematureFailure( 928 void GetContactPhotoOperation::RunCallbackOnPrematureFailure(
931 GDataErrorCode code) { 929 GDataErrorCode code) {
932 scoped_ptr<std::string> data(new std::string); 930 scoped_ptr<std::string> data(new std::string);
933 callback_.Run(code, data.Pass()); 931 callback_.Run(code, data.Pass());
934 } 932 }
935 933
936 } // namespace gdata 934 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations.h ('k') | chrome/browser/chromeos/gdata/mock_gdata_documents_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698