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_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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 const std::string& directory_resource_id, | 160 const std::string& directory_resource_id, |
161 const GetDataCallback& callback) | 161 const GetDataCallback& callback) |
162 : GetDataOperation(registry, callback), | 162 : GetDataOperation(registry, callback), |
163 start_changestamp_(start_changestamp), | 163 start_changestamp_(start_changestamp), |
164 search_string_(search_string), | 164 search_string_(search_string), |
165 directory_resource_id_(directory_resource_id) { | 165 directory_resource_id_(directory_resource_id) { |
166 } | 166 } |
167 | 167 |
168 GetDocumentsOperation::~GetDocumentsOperation() {} | 168 GetDocumentsOperation::~GetDocumentsOperation() {} |
169 | 169 |
170 void GetDocumentsOperation::SetUrl(const GURL& url) { | 170 void GetDocumentsOperation::SetURL(const GURL& url) { |
171 override_url_ = url; | 171 override_url_ = url; |
172 } | 172 } |
173 | 173 |
174 GURL GetDocumentsOperation::GetURL() const { | 174 GURL GetDocumentsOperation::GetURL() const { |
175 int max_docs = search_string_.empty() ? kMaxDocumentsPerFeed : | 175 int max_docs = search_string_.empty() ? kMaxDocumentsPerFeed : |
176 kMaxDocumentsPerSearchFeed; | 176 kMaxDocumentsPerSearchFeed; |
177 | 177 |
178 if (!override_url_.is_empty()) | 178 if (!override_url_.is_empty()) |
179 return AddFeedUrlParams(override_url_, | 179 return AddFeedUrlParams(override_url_, |
180 max_docs, | 180 max_docs, |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS); | 927 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS); |
928 } | 928 } |
929 | 929 |
930 void GetContactPhotoOperation::RunCallbackOnPrematureFailure( | 930 void GetContactPhotoOperation::RunCallbackOnPrematureFailure( |
931 GDataErrorCode code) { | 931 GDataErrorCode code) { |
932 scoped_ptr<std::string> data(new std::string); | 932 scoped_ptr<std::string> data(new std::string); |
933 callback_.Run(code, data.Pass()); | 933 callback_.Run(code, data.Pass()); |
934 } | 934 } |
935 | 935 |
936 } // namespace gdata | 936 } // namespace gdata |
OLD | NEW |