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

Side by Side Diff: components/filesystem/file_system_impl.cc

Issue 1166763002: Reland "Mandoline filesystem: Build the filesystem on windows." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DWORD -> INT for real checking. (This was wrong.) Created 5 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
« no previous file with comments | « components/filesystem/file_impl_unittest.cc ('k') | components/filesystem/files_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/filesystem/file_system_impl.h" 5 #include "components/filesystem/file_system_impl.h"
6 6
7 #include <fcntl.h>
8 #include <stdlib.h>
9 #include <sys/stat.h>
10 #include <sys/types.h>
11 #include <unistd.h>
12
13 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
14 #include "base/files/scoped_file.h" 8 #include "base/files/scoped_file.h"
15 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
16 #include "base/logging.h" 10 #include "base/logging.h"
17 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
18 #include "components/filesystem/directory_impl.h" 12 #include "components/filesystem/directory_impl.h"
19 #include "mojo/application/public/cpp/application_connection.h" 13 #include "mojo/application/public/cpp/application_connection.h"
20 14
21 namespace filesystem { 15 namespace filesystem {
22 16
(...skipping 16 matching lines...) Expand all
39 temp_dir.reset(new base::ScopedTempDir); 33 temp_dir.reset(new base::ScopedTempDir);
40 CHECK(temp_dir->CreateUniqueTempDir()); 34 CHECK(temp_dir->CreateUniqueTempDir());
41 path = temp_dir->path(); 35 path = temp_dir->path();
42 } else if (file_system.get() == std::string("origin")) { 36 } else if (file_system.get() == std::string("origin")) {
43 // TODO(erg): We should serve a persistent directory based on the 37 // TODO(erg): We should serve a persistent directory based on the
44 // subdirectory |remote_application_url_| of a profile directory. 38 // subdirectory |remote_application_url_| of a profile directory.
45 } 39 }
46 40
47 if (!path.empty()) { 41 if (!path.empty()) {
48 new DirectoryImpl(directory.Pass(), path, temp_dir.Pass()); 42 new DirectoryImpl(directory.Pass(), path, temp_dir.Pass());
49 callback.Run(ERROR_OK); 43 callback.Run(FILE_ERROR_OK);
50 } else { 44 } else {
51 callback.Run(ERROR_FAILED); 45 callback.Run(FILE_ERROR_FAILED);
52 } 46 }
53 } 47 }
54 48
55 } // namespace filesystem 49 } // namespace filesystem
OLDNEW
« no previous file with comments | « components/filesystem/file_impl_unittest.cc ('k') | components/filesystem/files_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698