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

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

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 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_system_impl.h ('k') | components/font_service/font_service_app.h » ('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"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/files/scoped_file.h" 13 #include "base/files/scoped_file.h"
14 #include "base/files/scoped_temp_dir.h" 14 #include "base/files/scoped_temp_dir.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "components/filesystem/directory_impl.h" 18 #include "components/filesystem/directory_impl.h"
19 #include "components/filesystem/file_system_app.h" 19 #include "components/filesystem/file_system_app.h"
20 #include "mojo/shell/public/cpp/application_connection.h" 20 #include "mojo/shell/public/cpp/connection.h"
21 #include "url/gurl.h" 21 #include "url/gurl.h"
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 #include "base/base_paths_win.h" 24 #include "base/base_paths_win.h"
25 #include "base/path_service.h" 25 #include "base/path_service.h"
26 #include "base/strings/utf_string_conversions.h" 26 #include "base/strings/utf_string_conversions.h"
27 #elif defined(OS_ANDROID) 27 #elif defined(OS_ANDROID)
28 #include "base/base_paths_android.h" 28 #include "base/base_paths_android.h"
29 #include "base/path_service.h" 29 #include "base/path_service.h"
30 #elif defined(OS_LINUX) 30 #elif defined(OS_LINUX)
31 #include "base/environment.h" 31 #include "base/environment.h"
32 #include "base/nix/xdg_util.h" 32 #include "base/nix/xdg_util.h"
33 #elif defined(OS_MACOSX) 33 #elif defined(OS_MACOSX)
34 #include "base/base_paths_mac.h" 34 #include "base/base_paths_mac.h"
35 #include "base/path_service.h" 35 #include "base/path_service.h"
36 #endif 36 #endif
37 37
38 namespace filesystem { 38 namespace filesystem {
39 39
40 namespace { 40 namespace {
41 41
42 const char kEscapeChar = ','; 42 const char kEscapeChar = ',';
43 43
44 const char kUserDataDir[] = "user-data-dir"; 44 const char kUserDataDir[] = "user-data-dir";
45 45
46 } // namespace filesystem 46 } // namespace filesystem
47 47
48 FileSystemImpl::FileSystemImpl(FileSystemApp* app, 48 FileSystemImpl::FileSystemImpl(FileSystemApp* app,
49 mojo::ApplicationConnection* connection, 49 mojo::Connection* connection,
50 mojo::InterfaceRequest<FileSystem> request) 50 mojo::InterfaceRequest<FileSystem> request)
51 : app_(app), 51 : app_(app),
52 remote_application_url_(connection->GetRemoteApplicationURL()), 52 remote_application_url_(connection->GetRemoteApplicationURL()),
53 binding_(this, std::move(request)) {} 53 binding_(this, std::move(request)) {}
54 54
55 FileSystemImpl::~FileSystemImpl() { 55 FileSystemImpl::~FileSystemImpl() {
56 } 56 }
57 57
58 void FileSystemImpl::OpenFileSystem(const mojo::String& file_system, 58 void FileSystemImpl::OpenFileSystem(const mojo::String& file_system,
59 mojo::InterfaceRequest<Directory> directory, 59 mojo::InterfaceRequest<Directory> directory,
(...skipping 93 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_system_impl.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698