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

Side by Side Diff: chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 10 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // Sets up the initial file system state for native local and restricted native 82 // Sets up the initial file system state for native local and restricted native
83 // local file systems. The hierarchy is the same as for the drive file system. 83 // local file systems. The hierarchy is the same as for the drive file system.
84 bool InitializeLocalFileSystem(base::ScopedTempDir* tmp_dir, 84 bool InitializeLocalFileSystem(base::ScopedTempDir* tmp_dir,
85 base::FilePath* mount_point_dir) { 85 base::FilePath* mount_point_dir) {
86 if (!tmp_dir->CreateUniqueTempDir()) 86 if (!tmp_dir->CreateUniqueTempDir())
87 return false; 87 return false;
88 88
89 *mount_point_dir = tmp_dir->path().AppendASCII("mount"); 89 *mount_point_dir = tmp_dir->path().AppendASCII("mount");
90 // Create the mount point. 90 // Create the mount point.
91 if (!file_util::CreateDirectory(*mount_point_dir)) 91 if (!base::CreateDirectory(*mount_point_dir))
92 return false; 92 return false;
93 93
94 base::FilePath test_dir = mount_point_dir->AppendASCII("test_dir"); 94 base::FilePath test_dir = mount_point_dir->AppendASCII("test_dir");
95 if (!file_util::CreateDirectory(test_dir)) 95 if (!base::CreateDirectory(test_dir))
96 return false; 96 return false;
97 97
98 base::FilePath test_subdir = test_dir.AppendASCII("empty_test_dir"); 98 base::FilePath test_subdir = test_dir.AppendASCII("empty_test_dir");
99 if (!file_util::CreateDirectory(test_subdir)) 99 if (!base::CreateDirectory(test_subdir))
100 return false; 100 return false;
101 101
102 test_subdir = test_dir.AppendASCII("subdir"); 102 test_subdir = test_dir.AppendASCII("subdir");
103 if (!file_util::CreateDirectory(test_subdir)) 103 if (!base::CreateDirectory(test_subdir))
104 return false; 104 return false;
105 105
106 base::FilePath test_file = test_dir.AppendASCII("test_file.xul"); 106 base::FilePath test_file = test_dir.AppendASCII("test_file.xul");
107 if (!google_apis::test_util::WriteStringToFile(test_file, kTestFileContent)) 107 if (!google_apis::test_util::WriteStringToFile(test_file, kTestFileContent))
108 return false; 108 return false;
109 109
110 test_file = test_dir.AppendASCII("test_file.xul.foo"); 110 test_file = test_dir.AppendASCII("test_file.xul.foo");
111 if (!google_apis::test_util::WriteStringToFile(test_file, kTestFileContent)) 111 if (!google_apis::test_util::WriteStringToFile(test_file, kTestFileContent))
112 return false; 112 return false;
113 113
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 fake_drive_service_->set_default_max_results(1); 425 fake_drive_service_->set_default_max_results(1);
426 EXPECT_TRUE(RunFileSystemExtensionApiTest( 426 EXPECT_TRUE(RunFileSystemExtensionApiTest(
427 "file_browser/handler_test_runner", 427 "file_browser/handler_test_runner",
428 FILE_PATH_LITERAL("manifest.json"), 428 FILE_PATH_LITERAL("manifest.json"),
429 "file_browser/app_file_handler", 429 "file_browser/app_file_handler",
430 FLAGS_USE_FILE_HANDLER)) << message_; 430 FLAGS_USE_FILE_HANDLER)) << message_;
431 } 431 }
432 432
433 } // namespace 433 } // namespace
434 } // namespace file_manager 434 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698