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

Side by Side Diff: platform.h

Issue 6598074: DoAutomaticFreeDiskSpaceControl() introduced (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « mount_unittest.cc ('k') | platform.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 (c) 2009-2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009-2010 The Chromium OS 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 #ifndef CRYPTOHOME_PLATFORM_H_ 5 #ifndef CRYPTOHOME_PLATFORM_H_
6 #define CRYPTOHOME_PLATFORM_H_ 6 #define CRYPTOHOME_PLATFORM_H_
7 7
8 #include <base/basictypes.h> 8 #include <base/basictypes.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Returns the user and group ids for a user 148 // Returns the user and group ids for a user
149 // 149 //
150 // Parameters 150 // Parameters
151 // user - The username to query for 151 // user - The username to query for
152 // user_id (OUT) - The user ID on success 152 // user_id (OUT) - The user ID on success
153 // group_id (OUT) - The group ID on success 153 // group_id (OUT) - The group ID on success
154 virtual bool GetUserId(const std::string& user, uid_t* user_id, 154 virtual bool GetUserId(const std::string& user, uid_t* user_id,
155 gid_t* group_id); 155 gid_t* group_id);
156 156
157 // Return the available disk space in bytes on the volume containing |path|,
158 // or -1 on failure.
159 // Code duplicated from Chrome's base::SysInfo::AmountOfFreeDiskSpace().
160 //
161 // Parameters
162 // path - the pathname of any file within the mounted file system
163 virtual int64 AmountOfFreeDiskSpace(const std::string& path);
164
157 // Clears the user keyring 165 // Clears the user keyring
158 static void ClearUserKeyring(); 166 static void ClearUserKeyring();
159 167
160 // Overrides the default mount options 168 // Overrides the default mount options
161 void set_mount_options(int value) { 169 void set_mount_options(int value) {
162 mount_options_ = value; 170 mount_options_ = value;
163 } 171 }
164 172
165 // Overrides the default mtab file 173 // Overrides the default mtab file
166 void set_mtab_file(const std::string& value) { 174 void set_mtab_file(const std::string& value) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 private: 253 private:
246 std::vector<std::string> cmd_line_; 254 std::vector<std::string> cmd_line_;
247 std::set<std::string> open_files_; 255 std::set<std::string> open_files_;
248 std::string cwd_; 256 std::string cwd_;
249 int process_id_; 257 int process_id_;
250 }; 258 };
251 259
252 } // namespace cryptohome 260 } // namespace cryptohome
253 261
254 #endif // CRYPTOHOME_PLATFORM_H_ 262 #endif // CRYPTOHOME_PLATFORM_H_
OLDNEW
« no previous file with comments | « mount_unittest.cc ('k') | platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698