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

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

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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_app.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_app.h" 5 #include "components/filesystem/file_system_app.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "mojo/shell/public/cpp/connection.h" 10 #include "mojo/shell/public/cpp/connection.h"
(...skipping 21 matching lines...) Expand all
32 const char kUserDataDir[] = "user-data-dir"; 32 const char kUserDataDir[] = "user-data-dir";
33 33
34 } // namespace filesystem 34 } // namespace filesystem
35 35
36 FileSystemApp::FileSystemApp() 36 FileSystemApp::FileSystemApp()
37 : shell_(nullptr), lock_table_(new LockTable) {} 37 : shell_(nullptr), lock_table_(new LockTable) {}
38 38
39 FileSystemApp::~FileSystemApp() {} 39 FileSystemApp::~FileSystemApp() {}
40 40
41 void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url, 41 void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url,
42 uint32_t id) { 42 uint32_t id, uint32_t user_id) {
43 shell_ = shell; 43 shell_ = shell;
44 tracing_.Initialize(shell, url); 44 tracing_.Initialize(shell, url);
45 } 45 }
46 46
47 bool FileSystemApp::AcceptConnection(mojo::Connection* connection) { 47 bool FileSystemApp::AcceptConnection(mojo::Connection* connection) {
48 connection->AddInterface<FileSystem>(this); 48 connection->AddInterface<FileSystem>(this);
49 return true; 49 return true;
50 } 50 }
51 51
52 // |InterfaceFactory<Files>| implementation: 52 // |InterfaceFactory<Files>| implementation:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 #endif 85 #endif
86 } 86 }
87 87
88 if (!base::PathExists(path)) 88 if (!base::PathExists(path))
89 base::CreateDirectory(path); 89 base::CreateDirectory(path);
90 90
91 return path; 91 return path;
92 } 92 }
93 93
94 } // namespace filesystem 94 } // namespace filesystem
OLDNEW
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698