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/drive/drive_scheduler.h" | 5 #include "chrome/browser/chromeos/drive/drive_scheduler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } else { | 87 } else { |
88 scoped_ptr<google_apis::ResourceList> resource_list; | 88 scoped_ptr<google_apis::ResourceList> resource_list; |
89 base::MessageLoopProxy::current()->PostTask(FROM_HERE, | 89 base::MessageLoopProxy::current()->PostTask(FROM_HERE, |
90 base::Bind(callback, | 90 base::Bind(callback, |
91 GDATA_PARSE_ERROR, | 91 GDATA_PARSE_ERROR, |
92 base::Passed(&resource_list))); | 92 base::Passed(&resource_list))); |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 virtual void GetResourceEntry(const std::string& resource_id, | 96 virtual void GetResourceEntry(const std::string& resource_id, |
97 const GetDataCallback& callback) { | 97 const GetResourceEntryCallback& callback) { |
98 } | 98 } |
99 | 99 |
100 virtual void GetAccountMetadata(const GetDataCallback& callback) { | 100 virtual void GetAccountMetadata(const GetDataCallback& callback) { |
101 // Make some sample data. | 101 // Make some sample data. |
102 const FilePath account_metadata = | 102 const FilePath account_metadata = |
103 test_util::GetTestFilePath("gdata/account_metadata.json"); | 103 test_util::GetTestFilePath("gdata/account_metadata.json"); |
104 std::string contents; | 104 std::string contents; |
105 file_util::ReadFileToString(account_metadata, &contents); | 105 file_util::ReadFileToString(account_metadata, &contents); |
106 scoped_ptr<base::Value> data(base::JSONReader::Read(contents)); | 106 scoped_ptr<base::Value> data(base::JSONReader::Read(contents)); |
107 | 107 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 | 611 |
612 FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt")); | 612 FilePath file_in_root(FILE_PATH_LITERAL("drive/File 1.txt")); |
613 DriveFileError error; | 613 DriveFileError error; |
614 scheduler_->Remove( | 614 scheduler_->Remove( |
615 file_in_root, false, | 615 file_in_root, false, |
616 base::Bind(&test_util::CopyErrorCodeFromFileOperationCallback, &error)); | 616 base::Bind(&test_util::CopyErrorCodeFromFileOperationCallback, &error)); |
617 google_apis::test_util::RunBlockingPoolTask(); | 617 google_apis::test_util::RunBlockingPoolTask(); |
618 } | 618 } |
619 | 619 |
620 } // namespace drive | 620 } // namespace drive |
OLD | NEW |