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

Side by Side Diff: base/file_path.h

Issue 16533: Convert download manager to FilePath. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « no previous file | base/file_util.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 (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 // FilePath is a container for pathnames stored in a platform's native string 5 // FilePath is a container for pathnames stored in a platform's native string
6 // type, providing containers for manipulation in according with the 6 // type, providing containers for manipulation in according with the
7 // platform's conventions for pathnames. It supports the following path 7 // platform's conventions for pathnames. It supports the following path
8 // types: 8 // types:
9 // 9 //
10 // POSIX Windows 10 // POSIX Windows
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return path_ == that.path_; 122 return path_ == that.path_;
123 } 123 }
124 124
125 // Required for some STL containers and operations 125 // Required for some STL containers and operations
126 bool operator<(const FilePath& that) const { 126 bool operator<(const FilePath& that) const {
127 return path_ < that.path_; 127 return path_ < that.path_;
128 } 128 }
129 129
130 const StringType& value() const { return path_; } 130 const StringType& value() const { return path_; }
131 131
132 bool empty() const { return path_.empty(); }
133
132 // Returns true if |character| is in kSeparators. 134 // Returns true if |character| is in kSeparators.
133 static bool IsSeparator(CharType character); 135 static bool IsSeparator(CharType character);
134 136
135 // Returns a FilePath corresponding to the directory containing the path 137 // Returns a FilePath corresponding to the directory containing the path
136 // named by this object, stripping away the file component. If this object 138 // named by this object, stripping away the file component. If this object
137 // only contains one component, returns a FilePath identifying 139 // only contains one component, returns a FilePath identifying
138 // kCurrentDirectory. If this object already refers to the root directory, 140 // kCurrentDirectory. If this object already refers to the root directory,
139 // returns a FilePath identifying the root directory. 141 // returns a FilePath identifying the root directory.
140 FilePath DirName() const; 142 FilePath DirName() const;
141 143
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 namespace stdext { 219 namespace stdext {
218 220
219 inline size_t hash_value(const FilePath& f) { 221 inline size_t hash_value(const FilePath& f) {
220 return hash_value(f.value()); 222 return hash_value(f.value());
221 } 223 }
222 224
223 } // namespace stdext 225 } // namespace stdext
224 #endif // COMPILER 226 #endif // COMPILER
225 227
226 #endif // BASE_FILE_PATH_H_ 228 #endif // BASE_FILE_PATH_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698