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

Side by Side Diff: services/files/files_impl.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | « services/files/file_impl_unittest.cc ('k') | services/files/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 "services/files/files_impl.h" 5 #include "services/files/files_impl.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 DCHECK(temp_dir); 72 DCHECK(temp_dir);
73 } else if (file_system.get() == std::string("debug")) { 73 } else if (file_system.get() == std::string("debug")) {
74 #ifdef NDEBUG 74 #ifdef NDEBUG
75 LOG(WARNING) << "~/MojoDebug only available in Debug builds"; 75 LOG(WARNING) << "~/MojoDebug only available in Debug builds";
76 #else 76 #else
77 // TODO(vtl): ScopedGeneric (hence ScopedFD) doesn't have an operator=! 77 // TODO(vtl): ScopedGeneric (hence ScopedFD) doesn't have an operator=!
78 dir_fd.reset(OpenMojoDebugDirectory().release()); 78 dir_fd.reset(OpenMojoDebugDirectory().release());
79 #endif 79 #endif
80 if (!dir_fd.is_valid()) { 80 if (!dir_fd.is_valid()) {
81 LOG(ERROR) << "~/MojoDebug unavailable"; 81 LOG(ERROR) << "~/MojoDebug unavailable";
82 callback.Run(ERROR_UNAVAILABLE); 82 callback.Run(Error::UNAVAILABLE);
83 return; 83 return;
84 } 84 }
85 } else { 85 } else {
86 LOG(ERROR) << "Unknown file system: " << file_system.get(); 86 LOG(ERROR) << "Unknown file system: " << file_system.get();
87 callback.Run(ERROR_UNIMPLEMENTED); 87 callback.Run(Error::UNIMPLEMENTED);
88 return; 88 return;
89 } 89 }
90 90
91 new DirectoryImpl(directory.Pass(), dir_fd.Pass(), temp_dir.Pass()); 91 new DirectoryImpl(directory.Pass(), dir_fd.Pass(), temp_dir.Pass());
92 callback.Run(ERROR_OK); 92 callback.Run(Error::OK);
93 } 93 }
94 94
95 } // namespace files 95 } // namespace files
96 } // namespace mojo 96 } // namespace mojo
OLDNEW
« no previous file with comments | « services/files/file_impl_unittest.cc ('k') | services/files/files_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698