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

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

Issue 10829375: Cleanup: separate WAPI and Drive API code in gdata_documents_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for comments 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_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"
11 #include "base/json/json_file_value_serializer.h" 11 #include "base/json/json_file_value_serializer.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/platform_file.h" 14 #include "base/platform_file.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 void MockDocumentsService::AuthenticateStub( 84 void MockDocumentsService::AuthenticateStub(
85 const AuthStatusCallback& callback) { 85 const AuthStatusCallback& callback) {
86 base::MessageLoopProxy::current()->PostTask( 86 base::MessageLoopProxy::current()->PostTask(
87 FROM_HERE, 87 FROM_HERE,
88 base::Bind(callback, HTTP_SUCCESS, "my_auth_token")); 88 base::Bind(callback, HTTP_SUCCESS, "my_auth_token"));
89 } 89 }
90 90
91 void MockDocumentsService::GetDocumentsStub( 91 void MockDocumentsService::GetDocumentsStub(
92 const GURL& feed_url, 92 const GURL& feed_url,
93 int start_changestamp, 93 int64 start_changestamp,
94 const std::string& search_string, 94 const std::string& search_string,
95 const std::string& directory_resource_id, 95 const std::string& directory_resource_id,
96 const GetDataCallback& callback) { 96 const GetDataCallback& callback) {
97 if (search_string.empty()) { 97 if (search_string.empty()) {
98 base::MessageLoopProxy::current()->PostTask( 98 base::MessageLoopProxy::current()->PostTask(
99 FROM_HERE, 99 FROM_HERE,
100 base::Bind(callback, HTTP_SUCCESS, base::Passed(&feed_data_))); 100 base::Bind(callback, HTTP_SUCCESS, base::Passed(&feed_data_)));
101 } else { 101 } else {
102 base::MessageLoopProxy::current()->PostTask( 102 base::MessageLoopProxy::current()->PostTask(
103 FROM_HERE, 103 FROM_HERE,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_documents_service.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