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

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

Issue 10855034: Drive: Remove gdata_params.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review (#16) fix & rebase 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/mock_gdata_documents_service.h" 5 #include "chrome/browser/chromeos/gdata/mock_gdata_documents_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 base::MessageLoopProxy::current()->PostTask( 175 base::MessageLoopProxy::current()->PostTask(
176 FROM_HERE, 176 FROM_HERE,
177 base::Bind(callback, HTTP_SUCCESS, base::Passed(&directory_data_))); 177 base::Bind(callback, HTTP_SUCCESS, base::Passed(&directory_data_)));
178 } 178 }
179 179
180 void MockDocumentsService::DownloadFileStub( 180 void MockDocumentsService::DownloadFileStub(
181 const FilePath& virtual_path, 181 const FilePath& virtual_path,
182 const FilePath& local_tmp_path, 182 const FilePath& local_tmp_path,
183 const GURL& content_url, 183 const GURL& content_url,
184 const DownloadActionCallback& download_action_callback, 184 const DownloadActionCallback& download_action_callback,
185 const GetDownloadDataCallback& get_download_data_callback) { 185 const GetContentCallback& get_content_callback) {
186 GDataErrorCode error = HTTP_SUCCESS; 186 GDataErrorCode error = HTTP_SUCCESS;
187 if (file_data_.get()) { 187 if (file_data_.get()) {
188 int file_data_size = static_cast<int>(file_data_->size()); 188 int file_data_size = static_cast<int>(file_data_->size());
189 ASSERT_EQ(file_data_size, 189 ASSERT_EQ(file_data_size,
190 file_util::WriteFile(local_tmp_path, file_data_->data(), 190 file_util::WriteFile(local_tmp_path, file_data_->data(),
191 file_data_size)); 191 file_data_size));
192 } 192 }
193 base::MessageLoopProxy::current()->PostTask( 193 base::MessageLoopProxy::current()->PostTask(
194 FROM_HERE, 194 FROM_HERE,
195 base::Bind(download_action_callback, error, content_url, local_tmp_path)); 195 base::Bind(download_action_callback, error, content_url, local_tmp_path));
196 } 196 }
197 197
198 } // namespace gdata 198 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/mock_gdata_documents_service.h ('k') | chrome/browser/chromeos/gdata/mock_gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698