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 "components/drive/service/fake_drive_service.h" | 5 #include "components/drive/service/fake_drive_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 share_url_base_("https://share_url/"), | 245 share_url_base_("https://share_url/"), |
246 weak_ptr_factory_(this) { | 246 weak_ptr_factory_(this) { |
247 about_resource_->set_largest_change_id(654321); | 247 about_resource_->set_largest_change_id(654321); |
248 about_resource_->set_quota_bytes_total(9876543210); | 248 about_resource_->set_quota_bytes_total(9876543210); |
249 about_resource_->set_quota_bytes_used_aggregate(6789012345); | 249 about_resource_->set_quota_bytes_used_aggregate(6789012345); |
250 about_resource_->set_root_folder_id(GetRootResourceId()); | 250 about_resource_->set_root_folder_id(GetRootResourceId()); |
251 } | 251 } |
252 | 252 |
253 FakeDriveService::~FakeDriveService() { | 253 FakeDriveService::~FakeDriveService() { |
254 DCHECK(thread_checker_.CalledOnValidThread()); | 254 DCHECK(thread_checker_.CalledOnValidThread()); |
255 STLDeleteValues(&entries_); | 255 base::STLDeleteValues(&entries_); |
256 } | 256 } |
257 | 257 |
258 bool FakeDriveService::LoadAppListForDriveApi( | 258 bool FakeDriveService::LoadAppListForDriveApi( |
259 const std::string& relative_path) { | 259 const std::string& relative_path) { |
260 DCHECK(thread_checker_.CalledOnValidThread()); | 260 DCHECK(thread_checker_.CalledOnValidThread()); |
261 | 261 |
262 // Load JSON data, which must be a dictionary. | 262 // Load JSON data, which must be a dictionary. |
263 std::unique_ptr<base::Value> value = test_util::LoadJSONFile(relative_path); | 263 std::unique_ptr<base::Value> value = test_util::LoadJSONFile(relative_path); |
264 CHECK_EQ(base::Value::TYPE_DICTIONARY, value->GetType()); | 264 CHECK_EQ(base::Value::TYPE_DICTIONARY, value->GetType()); |
265 app_info_value_.reset( | 265 app_info_value_.reset( |
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1792 | 1792 |
1793 NOTREACHED(); | 1793 NOTREACHED(); |
1794 return std::unique_ptr<BatchRequestConfiguratorInterface>(); | 1794 return std::unique_ptr<BatchRequestConfiguratorInterface>(); |
1795 } | 1795 } |
1796 | 1796 |
1797 void FakeDriveService::NotifyObservers() { | 1797 void FakeDriveService::NotifyObservers() { |
1798 FOR_EACH_OBSERVER(ChangeObserver, change_observers_, OnNewChangeAvailable()); | 1798 FOR_EACH_OBSERVER(ChangeObserver, change_observers_, OnNewChangeAvailable()); |
1799 } | 1799 } |
1800 | 1800 |
1801 } // namespace drive | 1801 } // namespace drive |
OLD | NEW |