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

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

Issue 1345433002: Add RTC_ prefix to contructormagic macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting fix. Created 5 years, 3 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/filerotatingstream.h ('k') | webrtc/base/flags.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } 400 }
401 401
402 static void GetApplicationName(std::string* application) { 402 static void GetApplicationName(std::string* application) {
403 EnsureDefaultFilesystem()->GetApplicationName(application); 403 EnsureDefaultFilesystem()->GetApplicationName(application);
404 } 404 }
405 405
406 private: 406 private:
407 static FilesystemInterface* default_filesystem_; 407 static FilesystemInterface* default_filesystem_;
408 408
409 static FilesystemInterface *EnsureDefaultFilesystem(); 409 static FilesystemInterface *EnsureDefaultFilesystem();
410 DISALLOW_IMPLICIT_CONSTRUCTORS(Filesystem); 410 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Filesystem);
411 }; 411 };
412 412
413 class FilesystemScope{ 413 class FilesystemScope{
414 public: 414 public:
415 explicit FilesystemScope(FilesystemInterface *new_fs) { 415 explicit FilesystemScope(FilesystemInterface *new_fs) {
416 old_fs_ = Filesystem::swap_default_filesystem(new_fs); 416 old_fs_ = Filesystem::swap_default_filesystem(new_fs);
417 } 417 }
418 ~FilesystemScope() { 418 ~FilesystemScope() {
419 Filesystem::set_default_filesystem(old_fs_); 419 Filesystem::set_default_filesystem(old_fs_);
420 } 420 }
421 private: 421 private:
422 FilesystemInterface* old_fs_; 422 FilesystemInterface* old_fs_;
423 DISALLOW_IMPLICIT_CONSTRUCTORS(FilesystemScope); 423 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FilesystemScope);
424 }; 424 };
425 425
426 // Generates a unique filename based on the input path. If no path component 426 // Generates a unique filename based on the input path. If no path component
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/filerotatingstream.h ('k') | webrtc/base/flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698