| 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_gallery/media_gallery_api.h" | 7 #include "chrome/browser/extensions/api/media_gallery/media_gallery_api.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 "dirname", Value::CreateStringValue("_")); | 52 "dirname", Value::CreateStringValue("_")); |
| 53 list->Append(dict_value); | 53 list->Append(dict_value); |
| 54 | 54 |
| 55 content::ChildProcessSecurityPolicy* policy = | 55 content::ChildProcessSecurityPolicy* policy = |
| 56 ChildProcessSecurityPolicy::GetInstance(); | 56 ChildProcessSecurityPolicy::GetInstance(); |
| 57 if (!policy->CanReadFile(child_id, path)) | 57 if (!policy->CanReadFile(child_id, path)) |
| 58 policy->GrantReadFile(child_id, path); | 58 policy->GrantReadFile(child_id, path); |
| 59 policy->GrantReadFileSystem(child_id, fsid); | 59 policy->GrantReadFileSystem(child_id, fsid); |
| 60 } | 60 } |
| 61 | 61 |
| 62 result_.reset(list); | 62 SetResult(list); |
| 63 return true; | 63 return true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 OpenMediaGalleryManagerFunction::~OpenMediaGalleryManagerFunction() {} | 66 OpenMediaGalleryManagerFunction::~OpenMediaGalleryManagerFunction() {} |
| 67 | 67 |
| 68 bool OpenMediaGalleryManagerFunction::RunImpl() { | 68 bool OpenMediaGalleryManagerFunction::RunImpl() { |
| 69 // TODO(vandebo) Open the Media Gallery Manager UI. | 69 // TODO(vandebo) Open the Media Gallery Manager UI. |
| 70 result_.reset(Value::CreateNullValue()); | 70 SetResult(Value::CreateNullValue()); |
| 71 return true; | 71 return true; |
| 72 } | 72 } |
| 73 | 73 |
| 74 AssembleMediaFileFunction::~AssembleMediaFileFunction() {} | 74 AssembleMediaFileFunction::~AssembleMediaFileFunction() {} |
| 75 | 75 |
| 76 bool AssembleMediaFileFunction::RunImpl() { | 76 bool AssembleMediaFileFunction::RunImpl() { |
| 77 // TODO(vandebo) Update the metadata and return the new file. | 77 // TODO(vandebo) Update the metadata and return the new file. |
| 78 result_.reset(Value::CreateNullValue()); | 78 SetResult(Value::CreateNullValue()); |
| 79 return true; | 79 return true; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace extensions | 82 } // namespace extensions |
| OLD | NEW |