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

Side by Side Diff: base/files/file_path.cc

Issue 630323003: [Issue - 116972] - Save File Problem with tar.bz (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added id to AUTHORS file Created 6 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 | « AUTHORS ('k') | base/files/file_path_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 #elif defined(OS_MACOSX) 28 #elif defined(OS_MACOSX)
29 #include <CoreFoundation/CoreFoundation.h> 29 #include <CoreFoundation/CoreFoundation.h>
30 #endif 30 #endif
31 31
32 namespace base { 32 namespace base {
33 33
34 typedef FilePath::StringType StringType; 34 typedef FilePath::StringType StringType;
35 35
36 namespace { 36 namespace {
37 37
38 const char* kCommonDoubleExtensionSuffixes[] = { "gz", "z", "bz2" }; 38 const char* kCommonDoubleExtensionSuffixes[] = { "gz", "z", "bz2", "bz" };
39 const char* kCommonDoubleExtensions[] = { "user.js" }; 39 const char* kCommonDoubleExtensions[] = { "user.js" };
40 40
41 const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0'); 41 const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0');
42 42
43 // If this FilePath contains a drive letter specification, returns the 43 // If this FilePath contains a drive letter specification, returns the
44 // position of the last character of the drive letter specification, 44 // position of the last character of the drive letter specification,
45 // otherwise returns npos. This can only be true on Windows, when a pathname 45 // otherwise returns npos. This can only be true on Windows, when a pathname
46 // begins with a letter followed by a colon. On other platforms, this always 46 // begins with a letter followed by a colon. On other platforms, this always
47 // returns npos. 47 // returns npos.
48 StringType::size_type FindDriveLetter(const StringType& path) { 48 StringType::size_type FindDriveLetter(const StringType& path) {
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 bool FilePath::IsContentUri() const { 1315 bool FilePath::IsContentUri() const {
1316 return StartsWithASCII(path_, "content://", false /*case_sensitive*/); 1316 return StartsWithASCII(path_, "content://", false /*case_sensitive*/);
1317 } 1317 }
1318 #endif 1318 #endif
1319 1319
1320 } // namespace base 1320 } // namespace base
1321 1321
1322 void PrintTo(const base::FilePath& path, std::ostream* out) { 1322 void PrintTo(const base::FilePath& path, std::ostream* out) {
1323 *out << path.value(); 1323 *out << path.value();
1324 } 1324 }
OLDNEW
« no previous file with comments | « AUTHORS ('k') | base/files/file_path_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698