Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // Implements the Chrome Extensions Media Galleries API. | 5 // Implements the Chrome Extensions Media Galleries API. |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" | 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 | 179 |
| 180 if (filesystems[i].path.empty()) | 180 if (filesystems[i].path.empty()) |
| 181 continue; | 181 continue; |
| 182 | 182 |
| 183 if (has_read_permission) { | 183 if (has_read_permission) { |
| 184 content::ChildProcessSecurityPolicy* policy = | 184 content::ChildProcessSecurityPolicy* policy = |
| 185 ChildProcessSecurityPolicy::GetInstance(); | 185 ChildProcessSecurityPolicy::GetInstance(); |
| 186 if (!policy->CanReadFile(child_id, filesystems[i].path)) | 186 if (!policy->CanReadFile(child_id, filesystems[i].path)) |
| 187 policy->GrantReadFile(child_id, filesystems[i].path); | 187 policy->GrantReadFile(child_id, filesystems[i].path); |
| 188 policy->GrantReadFileSystem(child_id, filesystems[i].fsid); | 188 policy->GrantReadFileSystem(child_id, filesystems[i].fsid); |
| 189 policy->GrantCreateFileForFileSystem(child_id, filesystems[i].fsid); | |
|
Greg Billock
2013/05/22 16:21:59
whitespace. But does this need to get gated by "if
vandebo (ex-Chrome)
2013/05/22 18:41:17
Oops, this is only for debugging. There are anoth
| |
| 189 } | 190 } |
| 190 } | 191 } |
| 191 | 192 |
| 192 SetResult(list); | 193 SetResult(list); |
| 193 SendResponse(true); | 194 SendResponse(true); |
| 194 } | 195 } |
| 195 | 196 |
| 196 void MediaGalleriesGetMediaFileSystemsFunction::ShowDialog() { | 197 void MediaGalleriesGetMediaFileSystemsFunction::ShowDialog() { |
| 197 WebContents* contents = WebContents::FromRenderViewHost(render_view_host()); | 198 WebContents* contents = WebContents::FromRenderViewHost(render_view_host()); |
| 198 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 199 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { | 240 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { |
| 240 if (!ApiIsAccessible(&error_)) | 241 if (!ApiIsAccessible(&error_)) |
| 241 return false; | 242 return false; |
| 242 | 243 |
| 243 // TODO(vandebo) Update the metadata and return the new file. | 244 // TODO(vandebo) Update the metadata and return the new file. |
| 244 SetResult(base::Value::CreateNullValue()); | 245 SetResult(base::Value::CreateNullValue()); |
| 245 return true; | 246 return true; |
| 246 } | 247 } |
| 247 | 248 |
| 248 } // namespace extensions | 249 } // namespace extensions |
| OLD | NEW |