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

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

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 path = base_profile_dir.Append(sanitized_origin); 83 path = base_profile_dir.Append(sanitized_origin);
84 #endif 84 #endif
85 if (!base::PathExists(path)) 85 if (!base::PathExists(path))
86 base::CreateDirectory(path); 86 base::CreateDirectory(path);
87 } 87 }
88 88
89 if (!path.empty()) { 89 if (!path.empty()) {
90 DirectoryImpl* dir_impl = 90 DirectoryImpl* dir_impl =
91 new DirectoryImpl(std::move(directory), path, std::move(temp_dir)); 91 new DirectoryImpl(std::move(directory), path, std::move(temp_dir));
92 app_->RegisterDirectoryToClient(dir_impl, std::move(client)); 92 app_->RegisterDirectoryToClient(dir_impl, std::move(client));
93 callback.Run(FILE_ERROR_OK); 93 callback.Run(FileError::OK);
94 } else { 94 } else {
95 callback.Run(FILE_ERROR_FAILED); 95 callback.Run(FileError::FAILED);
96 } 96 }
97 } 97 }
98 98
99 base::FilePath FileSystemImpl::GetSystemProfileDir() const { 99 base::FilePath FileSystemImpl::GetSystemProfileDir() const {
100 base::FilePath path; 100 base::FilePath path;
101 101
102 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 102 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
103 if (command_line->HasSwitch(kUserDataDir)) { 103 if (command_line->HasSwitch(kUserDataDir)) {
104 path = command_line->GetSwitchValuePath(kUserDataDir); 104 path = command_line->GetSwitchValuePath(kUserDataDir);
105 } else { 105 } else {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 encoded[1] += (encoded[1] >= 10) ? 'A' - 10 : '0'; 153 encoded[1] += (encoded[1] >= 10) ? 'A' - 10 : '0';
154 encoded[2] = ch % 16; 154 encoded[2] = ch % 16;
155 encoded[2] += (encoded[2] >= 10) ? 'A' - 10 : '0'; 155 encoded[2] += (encoded[2] >= 10) ? 'A' - 10 : '0';
156 encoded_len = 3; 156 encoded_len = 3;
157 } 157 }
158 sanitized_origin->append(encoded, encoded_len); 158 sanitized_origin->append(encoded, encoded_len);
159 } 159 }
160 } 160 }
161 161
162 } // namespace filesystem 162 } // 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