| OLD | NEW |
| 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 #include "chrome/browser/chromeos/extensions/file_manager/private_api_file_syste
m.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_file_syste
m.h" |
| 6 | 6 |
| 7 #include <sys/statvfs.h> | 7 #include <sys/statvfs.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 scoped_refptr<storage::FileSystemContext> file_system_context = | 296 scoped_refptr<storage::FileSystemContext> file_system_context = |
| 297 file_manager::util::GetFileSystemContextForRenderFrameHost( | 297 file_manager::util::GetFileSystemContextForRenderFrameHost( |
| 298 chrome_details_.GetProfile(), render_frame_host()); | 298 chrome_details_.GetProfile(), render_frame_host()); |
| 299 | 299 |
| 300 storage::ExternalFileSystemBackend* const backend = | 300 storage::ExternalFileSystemBackend* const backend = |
| 301 file_system_context->external_backend(); | 301 file_system_context->external_backend(); |
| 302 DCHECK(backend); | 302 DCHECK(backend); |
| 303 | 303 |
| 304 const std::vector<Profile*>& profiles = | 304 const std::vector<Profile*>& profiles = |
| 305 g_browser_process->profile_manager()->GetLoadedProfiles(); | 305 g_browser_process->profile_manager()->GetLoadedProfiles(); |
| 306 for (const auto& profile : profiles) { | 306 for (auto* profile : profiles) { |
| 307 if (profile->IsOffTheRecord()) | 307 if (profile->IsOffTheRecord()) |
| 308 continue; | 308 continue; |
| 309 const GURL site = util::GetSiteForExtensionId(extension_id(), profile); | 309 const GURL site = util::GetSiteForExtensionId(extension_id(), profile); |
| 310 storage::FileSystemContext* const context = | 310 storage::FileSystemContext* const context = |
| 311 content::BrowserContext::GetStoragePartitionForSite(profile, site) | 311 content::BrowserContext::GetStoragePartitionForSite(profile, site) |
| 312 ->GetFileSystemContext(); | 312 ->GetFileSystemContext(); |
| 313 for (const auto& url : params->entry_urls) { | 313 for (const auto& url : params->entry_urls) { |
| 314 const storage::FileSystemURL file_system_url = | 314 const storage::FileSystemURL file_system_url = |
| 315 context->CrackURL(GURL(url)); | 315 context->CrackURL(GURL(url)); |
| 316 // Grant permissions only to valid urls backed by the external file system | 316 // Grant permissions only to valid urls backed by the external file system |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 return RespondLater(); | 995 return RespondLater(); |
| 996 } | 996 } |
| 997 | 997 |
| 998 void FileManagerPrivateInternalSetEntryTagFunction::OnSetEntryPropertyCompleted( | 998 void FileManagerPrivateInternalSetEntryTagFunction::OnSetEntryPropertyCompleted( |
| 999 drive::FileError result) { | 999 drive::FileError result) { |
| 1000 Respond(result == drive::FILE_ERROR_OK ? NoArguments() | 1000 Respond(result == drive::FILE_ERROR_OK ? NoArguments() |
| 1001 : Error("Failed to set a tag.")); | 1001 : Error("Failed to set a tag.")); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace extensions | 1004 } // namespace extensions |
| OLD | NEW |