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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_util.cc

Issue 10008100: gdata: Support mouting archive file in GData cache (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: gdata: Support mounting archive files in GData cache Created 8 years, 8 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
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 "chrome/browser/chromeos/gdata/gdata_util.h" 5 #include "chrome/browser/chromeos/gdata/gdata_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 kReadOnlyFilePermissions)); 211 kReadOnlyFilePermissions));
212 // TODO(tbarzic): When we start supporting openFile operation, we may have to 212 // TODO(tbarzic): When we start supporting openFile operation, we may have to
213 // change permission for localy modified files to match handler's permissions. 213 // change permission for localy modified files to match handler's permissions.
214 cache_paths->push_back(std::make_pair( 214 cache_paths->push_back(std::make_pair(
215 file_system->GetCacheFilePath(resource_id, file_md5, 215 file_system->GetCacheFilePath(resource_id, file_md5,
216 GDataRootDirectory::CACHE_TYPE_PERSISTENT, 216 GDataRootDirectory::CACHE_TYPE_PERSISTENT,
217 GDataFileSystem::CACHED_FILE_LOCALLY_MODIFIED), 217 GDataFileSystem::CACHED_FILE_LOCALLY_MODIFIED),
218 kReadOnlyFilePermissions)); 218 kReadOnlyFilePermissions));
219 cache_paths->push_back(std::make_pair( 219 cache_paths->push_back(std::make_pair(
220 file_system->GetCacheFilePath(resource_id, file_md5, 220 file_system->GetCacheFilePath(resource_id, file_md5,
221 GDataRootDirectory::CACHE_TYPE_PERSISTENT,
222 GDataFileSystem::CACHED_FILE_MOUNTED),
223 kReadOnlyFilePermissions));
224 cache_paths->push_back(std::make_pair(
225 file_system->GetCacheFilePath(resource_id, file_md5,
221 GDataRootDirectory::CACHE_TYPE_TMP, 226 GDataRootDirectory::CACHE_TYPE_TMP,
222 GDataFileSystem::CACHED_FILE_FROM_SERVER), 227 GDataFileSystem::CACHED_FILE_FROM_SERVER),
223 kReadOnlyFilePermissions)); 228 kReadOnlyFilePermissions));
224 229
225 } 230 }
226 231
227 void SetPermissionsForGDataCacheFiles(Profile* profile, 232 void SetPermissionsForGDataCacheFiles(Profile* profile,
228 int pid, 233 int pid,
229 const FilePath& path) { 234 const FilePath& path) {
230 std::vector<std::pair<FilePath, int> > cache_paths; 235 std::vector<std::pair<FilePath, int> > cache_paths;
(...skipping 20 matching lines...) Expand all
251 // --disable-gdata or enterprise policy, or probably with user settings too 256 // --disable-gdata or enterprise policy, or probably with user settings too
252 // in the future. 257 // in the future.
253 if (profile->GetPrefs()->GetBoolean(prefs::kDisableGData)) 258 if (profile->GetPrefs()->GetBoolean(prefs::kDisableGData))
254 return false; 259 return false;
255 260
256 return true; 261 return true;
257 } 262 }
258 263
259 } // namespace util 264 } // namespace util
260 } // namespace gdata 265 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698