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

Side by Side Diff: chrome/browser/sync/util/path_helpers.h

Issue 193103: Build sync engine as part of the browser build (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/util/highres_timer_win.h ('k') | chrome/browser/sync/util/path_helpers.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 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_ 5 #ifndef CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_
6 #define CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_ 6 #define CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 #include <string> 10 #include <string>
11 11
12 #include "chrome/browser/sync/util/compat-file.h" 12 #include "chrome/browser/sync/util/compat_file.h"
13 #include "chrome/browser/sync/util/sync_types.h" 13 #include "chrome/browser/sync/util/sync_types.h"
14 14
15 template <typename StringType> 15 template <typename StringType>
16 class PathSegmentIterator : public std::iterator<std::forward_iterator_tag, 16 class PathSegmentIterator : public std::iterator<std::forward_iterator_tag,
17 StringType> { 17 StringType> {
18 public: 18 public:
19 explicit PathSegmentIterator(const StringType& path) : 19 explicit PathSegmentIterator(const StringType& path) :
20 path_(path), segment_begin_(0), segment_end_(0) { 20 path_(path), segment_begin_(0), segment_end_(0) {
21 ++(*this); 21 ++(*this);
22 } 22 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Makes a path component legal for your OS, but doesn't handle collisions 96 // Makes a path component legal for your OS, but doesn't handle collisions
97 // with other files in the same directory. it can do this by removing 97 // with other files in the same directory. it can do this by removing
98 // illegal characters and adding ~1 before the first '.' in the filename. 98 // illegal characters and adding ~1 before the first '.' in the filename.
99 // returns PSTR("") if the name is fine as-is 99 // returns PSTR("") if the name is fine as-is
100 // on mac/linux we let names stay unicode normalization form C in the system 100 // on mac/linux we let names stay unicode normalization form C in the system
101 // and convert to another normal form in fuse handlers. but, if a '/' is in 101 // and convert to another normal form in fuse handlers. but, if a '/' is in
102 // a filename, we handle it here. 102 // a filename, we handle it here.
103 PathString MakePathComponentOSLegal(const PathString& component); 103 PathString MakePathComponentOSLegal(const PathString& component);
104 104
105 #endif // CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_ 105 #endif // CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/highres_timer_win.h ('k') | chrome/browser/sync/util/path_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698