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

Side by Side Diff: webrtc/base/fileutils.h

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… 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 | « webrtc/base/faketaskrunner.h ('k') | webrtc/base/fileutils_mock.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 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 // Get a temporary folder that is unique to the current user and application. 228 // Get a temporary folder that is unique to the current user and application.
229 // TODO: Re-evaluate the goals of this function. We probably just need any 229 // TODO: Re-evaluate the goals of this function. We probably just need any
230 // directory that won't collide with another existing directory, and which 230 // directory that won't collide with another existing directory, and which
231 // will be cleaned up when the program exits. 231 // will be cleaned up when the program exits.
232 virtual bool GetAppTempFolder(Pathname* path) = 0; 232 virtual bool GetAppTempFolder(Pathname* path) = 0;
233 233
234 // Delete the contents of the folder returned by GetAppTempFolder 234 // Delete the contents of the folder returned by GetAppTempFolder
235 bool CleanAppTempFolder(); 235 bool CleanAppTempFolder();
236 236
237 virtual bool GetDiskFreeSpace(const Pathname& path, int64 *freebytes) = 0; 237 virtual bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) = 0;
238 238
239 // Returns the absolute path of the current directory. 239 // Returns the absolute path of the current directory.
240 virtual Pathname GetCurrentDirectory() = 0; 240 virtual Pathname GetCurrentDirectory() = 0;
241 241
242 // Note: These might go into some shared config section later, but they're 242 // Note: These might go into some shared config section later, but they're
243 // used by some methods in this interface, so we're leaving them here for now. 243 // used by some methods in this interface, so we're leaving them here for now.
244 void SetOrganizationName(const std::string& organization) { 244 void SetOrganizationName(const std::string& organization) {
245 organization_name_ = organization; 245 organization_name_ = organization;
246 } 246 }
247 void GetOrganizationName(std::string* organization) { 247 void GetOrganizationName(std::string* organization) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 373
374 static bool GetAppTempFolder(Pathname* path) { 374 static bool GetAppTempFolder(Pathname* path) {
375 return EnsureDefaultFilesystem()->GetAppTempFolder(path); 375 return EnsureDefaultFilesystem()->GetAppTempFolder(path);
376 } 376 }
377 377
378 static bool CleanAppTempFolder() { 378 static bool CleanAppTempFolder() {
379 return EnsureDefaultFilesystem()->CleanAppTempFolder(); 379 return EnsureDefaultFilesystem()->CleanAppTempFolder();
380 } 380 }
381 381
382 static bool GetDiskFreeSpace(const Pathname& path, int64 *freebytes) { 382 static bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) {
383 return EnsureDefaultFilesystem()->GetDiskFreeSpace(path, freebytes); 383 return EnsureDefaultFilesystem()->GetDiskFreeSpace(path, freebytes);
384 } 384 }
385 385
386 // Definition has to be in the .cc file due to returning forward-declared 386 // Definition has to be in the .cc file due to returning forward-declared
387 // Pathname by value. 387 // Pathname by value.
388 static Pathname GetCurrentDirectory(); 388 static Pathname GetCurrentDirectory();
389 389
390 static void SetOrganizationName(const std::string& organization) { 390 static void SetOrganizationName(const std::string& organization) {
391 EnsureDefaultFilesystem()->SetOrganizationName(organization); 391 EnsureDefaultFilesystem()->SetOrganizationName(organization);
392 } 392 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // is specified, it uses the temporary directory. If a filename is provided, 427 // is specified, it uses the temporary directory. If a filename is provided,
428 // up to 100 variations of form basename-N.extension are tried. When 428 // up to 100 variations of form basename-N.extension are tried. When
429 // create_empty is true, an empty file of this name is created (which 429 // create_empty is true, an empty file of this name is created (which
430 // decreases the chance of a temporary filename collision with another 430 // decreases the chance of a temporary filename collision with another
431 // process). 431 // process).
432 bool CreateUniqueFile(Pathname& path, bool create_empty); 432 bool CreateUniqueFile(Pathname& path, bool create_empty);
433 433
434 } // namespace rtc 434 } // namespace rtc
435 435
436 #endif // WEBRTC_BASE_FILEUTILS_H_ 436 #endif // WEBRTC_BASE_FILEUTILS_H_
OLDNEW
« no previous file with comments | « webrtc/base/faketaskrunner.h ('k') | webrtc/base/fileutils_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698