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

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

Issue 10877005: Rename GDataCache* to DriveCache* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 8 years, 4 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_handler_util.h" 5 #include "chrome/browser/chromeos/extensions/file_handler_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 } 858 }
859 859
860 if (gdata_paths->empty()) { 860 if (gdata_paths->empty()) {
861 // Invoke callback if none of the files are on gdata mount point. 861 // Invoke callback if none of the files are on gdata mount point.
862 callback.Run(); 862 callback.Run();
863 return; 863 return;
864 } 864 }
865 865
866 // For files on gdata mount point, we'll have to give handler host permissions 866 // For files on gdata mount point, we'll have to give handler host permissions
867 // for their cache paths. This has to be called on UI thread. 867 // for their cache paths. This has to be called on UI thread.
868 gdata::util::InsertGDataCachePathsPermissions(profile(), 868 gdata::util::InsertDriveCachePathsPermissions(profile(),
869 gdata_paths.Pass(), 869 gdata_paths.Pass(),
870 &handler_host_permissions_, 870 &handler_host_permissions_,
871 callback); 871 callback);
872 } 872 }
873 873
874 void ExtensionTaskExecutor::SetupHandlerHostFileAccessPermissions( 874 void ExtensionTaskExecutor::SetupHandlerHostFileAccessPermissions(
875 int handler_pid) { 875 int handler_pid) {
876 for (size_t i = 0; i < handler_host_permissions_.size(); i++) { 876 for (size_t i = 0; i < handler_host_permissions_.size(); i++) {
877 content::ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 877 content::ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
878 handler_pid, 878 handler_pid,
879 handler_host_permissions_[i].first, 879 handler_host_permissions_[i].first,
880 handler_host_permissions_[i].second); 880 handler_host_permissions_[i].second);
881 } 881 }
882 882
883 // We don't need this anymore. 883 // We don't need this anymore.
884 handler_host_permissions_.clear(); 884 handler_host_permissions_.clear();
885 } 885 }
886 886
887 } // namespace file_handler_util 887 } // namespace file_handler_util
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_private_api.cc ('k') | chrome/browser/chromeos/gdata/drive_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698