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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_handler_api.cc

Issue 10905142: Rename GData to Drive in drive_file_system_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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/extensions/file_browser_handler_api.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_handler_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Grant access to this particular file to target extension. This will 260 // Grant access to this particular file to target extension. This will
261 // ensure that the target extension can access only this FS entry and 261 // ensure that the target extension can access only this FS entry and
262 // prevent from traversing FS hierarchy upward. 262 // prevent from traversing FS hierarchy upward.
263 external_provider->GrantFileAccessToExtension(extension_id(), virtual_path); 263 external_provider->GrantFileAccessToExtension(extension_id(), virtual_path);
264 264
265 // Give read write permissions for the file. 265 // Give read write permissions for the file.
266 permissions_to_grant_.push_back(std::make_pair( 266 permissions_to_grant_.push_back(std::make_pair(
267 full_path_, 267 full_path_,
268 file_handler_util::GetReadWritePermissions())); 268 file_handler_util::GetReadWritePermissions()));
269 269
270 if (!gdata::util::IsUnderGDataMountPoint(full_path_)) { 270 if (!gdata::util::IsUnderDriveMountPoint(full_path_)) {
271 OnGotPermissionsToGrant(callback, virtual_path); 271 OnGotPermissionsToGrant(callback, virtual_path);
272 return; 272 return;
273 } 273 }
274 274
275 // For drive files, we also have to grant permissions for cache paths. 275 // For drive files, we also have to grant permissions for cache paths.
276 scoped_ptr<std::vector<FilePath> > gdata_paths(new std::vector<FilePath>()); 276 scoped_ptr<std::vector<FilePath> > gdata_paths(new std::vector<FilePath>());
277 gdata_paths->push_back(virtual_path); 277 gdata_paths->push_back(virtual_path);
278 278
279 gdata::util::InsertDriveCachePathsPermissions( 279 gdata::util::InsertDriveCachePathsPermissions(
280 profile(), 280 profile(),
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 if (result) { 321 if (result) {
322 result->set_function_for_test(this); 322 result->set_function_for_test(this);
323 return result; 323 return result;
324 } 324 }
325 return new FileSelectorImpl(this); 325 return new FileSelectorImpl(this);
326 } 326 }
327 327
328 FileSelector* FileHandlerSelectFileFunction::file_selector_for_test_ = NULL; 328 FileSelector* FileHandlerSelectFileFunction::file_selector_for_test_ = NULL;
329 329
330 bool FileHandlerSelectFileFunction::gesture_check_disabled_for_test_ = false; 330 bool FileHandlerSelectFileFunction::gesture_check_disabled_for_test_ = false;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698