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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_util.h

Issue 177233005: [SyncFS] Wire up MetadataDatabaseIndex to MetadataDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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 | chrome/browser/sync_file_system/drive_backend/drive_backend_util.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool HasFileAsParent(const FileDetails& details, const std::string& file_id); 61 bool HasFileAsParent(const FileDetails& details, const std::string& file_id);
62 62
63 std::string GetMimeTypeFromTitle(const base::FilePath& title); 63 std::string GetMimeTypeFromTitle(const base::FilePath& title);
64 64
65 scoped_ptr<google_apis::ResourceEntry> GetOldestCreatedFolderResource( 65 scoped_ptr<google_apis::ResourceEntry> GetOldestCreatedFolderResource(
66 ScopedVector<google_apis::ResourceEntry> list); 66 ScopedVector<google_apis::ResourceEntry> list);
67 67
68 SyncStatusCode GDataErrorCodeToSyncStatusCode( 68 SyncStatusCode GDataErrorCodeToSyncStatusCode(
69 google_apis::GDataErrorCode error); 69 google_apis::GDataErrorCode error);
70 70
71 scoped_ptr<FileTracker> CloneFileTracker(const FileTracker* obj);
72
71 template <typename Src, typename Dest> 73 template <typename Src, typename Dest>
72 void AppendContents(const Src& src, Dest* dest) { 74 void AppendContents(const Src& src, Dest* dest) {
73 dest->insert(dest->end(), src.begin(), src.end()); 75 dest->insert(dest->end(), src.begin(), src.end());
74 } 76 }
75 77
76 template <typename Container> 78 template <typename Container>
77 const typename Container::mapped_type& LookUpMap( 79 const typename Container::mapped_type& LookUpMap(
78 const Container& container, 80 const Container& container,
79 const typename Container::key_type& key, 81 const typename Container::key_type& key,
80 const typename Container::mapped_type& default_value) { 82 const typename Container::mapped_type& default_value) {
81 typename Container::const_iterator found = container.find(key); 83 typename Container::const_iterator found = container.find(key);
82 if (found == container.end()) 84 if (found == container.end())
83 return default_value; 85 return default_value;
84 return found->second; 86 return found->second;
85 } 87 }
86 88
87 } // namespace drive_backend 89 } // namespace drive_backend
88 } // namespace sync_file_system 90 } // namespace sync_file_system
89 91
90 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_ 92 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698