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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_unittest.cc

Issue 15650008: drive: Rename drive::DriveClientContext to drive::ClientContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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/drive/file_system.h" 5 #include "chrome/browser/chromeos/drive/file_system.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 1374
1375 base::FilePath file_in_root(FILE_PATH_LITERAL("drive/root/File 1.txt")); 1375 base::FilePath file_in_root(FILE_PATH_LITERAL("drive/root/File 1.txt"));
1376 scoped_ptr<ResourceEntry> entry(GetResourceEntryByPathSync(file_in_root)); 1376 scoped_ptr<ResourceEntry> entry(GetResourceEntryByPathSync(file_in_root));
1377 std::string resource_id = entry->resource_id(); 1377 std::string resource_id = entry->resource_id();
1378 1378
1379 FileError error = FILE_ERROR_OK; 1379 FileError error = FILE_ERROR_OK;
1380 base::FilePath file_path; 1380 base::FilePath file_path;
1381 entry.reset(); 1381 entry.reset();
1382 file_system_->GetFileByResourceId( 1382 file_system_->GetFileByResourceId(
1383 resource_id, 1383 resource_id,
1384 DriveClientContext(USER_INITIATED), 1384 ClientContext(USER_INITIATED),
1385 google_apis::test_util::CreateCopyResultCallback( 1385 google_apis::test_util::CreateCopyResultCallback(
1386 &error, &file_path, &entry), 1386 &error, &file_path, &entry),
1387 google_apis::GetContentCallback()); 1387 google_apis::GetContentCallback());
1388 google_apis::test_util::RunBlockingPoolTask(); 1388 google_apis::test_util::RunBlockingPoolTask();
1389 1389
1390 EXPECT_EQ(FILE_ERROR_OK, error); 1390 EXPECT_EQ(FILE_ERROR_OK, error);
1391 ASSERT_TRUE(entry); 1391 ASSERT_TRUE(entry);
1392 EXPECT_FALSE(entry->file_specific_info().is_hosted_document()); 1392 EXPECT_FALSE(entry->file_specific_info().is_hosted_document());
1393 } 1393 }
1394 1394
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 1486
1487 // The file is obtained from the cache. 1487 // The file is obtained from the cache.
1488 // Hence the downloading should work even if the drive service is offline. 1488 // Hence the downloading should work even if the drive service is offline.
1489 fake_drive_service_->set_offline(true); 1489 fake_drive_service_->set_offline(true);
1490 1490
1491 std::string resource_id = entry->resource_id(); 1491 std::string resource_id = entry->resource_id();
1492 base::FilePath file_path; 1492 base::FilePath file_path;
1493 entry.reset(); 1493 entry.reset();
1494 file_system_->GetFileByResourceId( 1494 file_system_->GetFileByResourceId(
1495 resource_id, 1495 resource_id,
1496 DriveClientContext(USER_INITIATED), 1496 ClientContext(USER_INITIATED),
1497 google_apis::test_util::CreateCopyResultCallback( 1497 google_apis::test_util::CreateCopyResultCallback(
1498 &error, &file_path, &entry), 1498 &error, &file_path, &entry),
1499 google_apis::GetContentCallback()); 1499 google_apis::GetContentCallback());
1500 google_apis::test_util::RunBlockingPoolTask(); 1500 google_apis::test_util::RunBlockingPoolTask();
1501 1501
1502 EXPECT_EQ(FILE_ERROR_OK, error); 1502 EXPECT_EQ(FILE_ERROR_OK, error);
1503 ASSERT_TRUE(entry); 1503 ASSERT_TRUE(entry);
1504 EXPECT_FALSE(entry->file_specific_info().is_hosted_document()); 1504 EXPECT_FALSE(entry->file_specific_info().is_hosted_document());
1505 } 1505 }
1506 1506
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 entry->resource_id(), 1674 entry->resource_id(),
1675 entry->file_specific_info().file_md5(), 1675 entry->file_specific_info().file_md5(),
1676 google_apis::test_util::CreateCopyResultCallback(&success, &cache_entry)); 1676 google_apis::test_util::CreateCopyResultCallback(&success, &cache_entry));
1677 google_apis::test_util::RunBlockingPoolTask(); 1677 google_apis::test_util::RunBlockingPoolTask();
1678 1678
1679 EXPECT_TRUE(success); 1679 EXPECT_TRUE(success);
1680 EXPECT_FALSE(cache_entry.is_mounted()); 1680 EXPECT_FALSE(cache_entry.is_mounted());
1681 } 1681 }
1682 1682
1683 } // namespace drive 1683 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_interface.h ('k') | chrome/browser/chromeos/drive/job_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698