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

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

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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_util.h" 5 #include "chrome/browser/chromeos/drive/file_system_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Set up file system context for testing. 91 // Set up file system context for testing.
92 base::ScopedTempDir temp_dir_; 92 base::ScopedTempDir temp_dir_;
93 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 93 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
94 94
95 base::MessageLoop message_loop; 95 base::MessageLoop message_loop;
96 scoped_refptr<fileapi::ExternalMountPoints> mount_points = 96 scoped_refptr<fileapi::ExternalMountPoints> mount_points =
97 fileapi::ExternalMountPoints::CreateRefCounted(); 97 fileapi::ExternalMountPoints::CreateRefCounted();
98 scoped_refptr<fileapi::FileSystemContext> context( 98 scoped_refptr<fileapi::FileSystemContext> context(
99 new fileapi::FileSystemContext( 99 new fileapi::FileSystemContext(
100 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(), 100 fileapi::FileSystemTaskRunners::CreateMockTaskRunners(),
101 mount_points, 101 mount_points.get(),
102 NULL, // special_storage_policy 102 NULL, // special_storage_policy
103 NULL, // quota_manager_proxy, 103 NULL, // quota_manager_proxy,
104 ScopedVector<fileapi::FileSystemMountPointProvider>(), 104 ScopedVector<fileapi::FileSystemMountPointProvider>(),
105 temp_dir_.path(), // partition_path 105 temp_dir_.path(), // partition_path
106 fileapi::CreateAllowFileAccessOptions())); 106 fileapi::CreateAllowFileAccessOptions()));
107 107
108 // Type:"external" + virtual_path:"drive/foo/bar" resolves to "drive/foo/bar". 108 // Type:"external" + virtual_path:"drive/foo/bar" resolves to "drive/foo/bar".
109 const std::string& drive_mount_name = 109 const std::string& drive_mount_name =
110 GetDriveMountPointPath().BaseName().AsUTF8Unsafe(); 110 GetDriveMountPointPath().BaseName().AsUTF8Unsafe();
111 mount_points->RegisterRemoteFileSystem( 111 mount_points->RegisterRemoteFileSystem(
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 std::string data = "Hello world!"; 323 std::string data = "Hello world!";
324 EXPECT_EQ(static_cast<int>(data.size()), 324 EXPECT_EQ(static_cast<int>(data.size()),
325 file_util::WriteFile(file, data.data(), data.size())); 325 file_util::WriteFile(file, data.data(), data.size()));
326 EXPECT_FALSE(HasGDocFileExtension(file)); 326 EXPECT_FALSE(HasGDocFileExtension(file));
327 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); 327 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty());
328 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); 328 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty());
329 } 329 }
330 330
331 } // namespace util 331 } // namespace util
332 } // namespace drive 332 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_unittest.cc ('k') | chrome/browser/chromeos/drive/local_file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698