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 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" | 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api.
h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 file_type_index)) { | 1135 file_type_index)) { |
1136 return RespondNow(Error(kCouldNotShowSelectFileDialogError)); | 1136 return RespondNow(Error(kCouldNotShowSelectFileDialogError)); |
1137 } | 1137 } |
1138 | 1138 |
1139 AddRef(); // Balanced by FileSelected / FileSelectionCanceled. | 1139 AddRef(); // Balanced by FileSelected / FileSelectionCanceled. |
1140 return RespondLater(); | 1140 return RespondLater(); |
1141 } | 1141 } |
1142 | 1142 |
1143 void DeveloperPrivateChoosePathFunction::FileSelected( | 1143 void DeveloperPrivateChoosePathFunction::FileSelected( |
1144 const base::FilePath& path) { | 1144 const base::FilePath& path) { |
1145 Respond(OneArgument(new base::StringValue(path.LossyDisplayName()))); | 1145 Respond(OneArgument( |
| 1146 base::MakeUnique<base::StringValue>(path.LossyDisplayName()))); |
1146 Release(); | 1147 Release(); |
1147 } | 1148 } |
1148 | 1149 |
1149 void DeveloperPrivateChoosePathFunction::FileSelectionCanceled() { | 1150 void DeveloperPrivateChoosePathFunction::FileSelectionCanceled() { |
1150 // This isn't really an error, but we should keep it like this for | 1151 // This isn't really an error, but we should keep it like this for |
1151 // backward compatability. | 1152 // backward compatability. |
1152 Respond(Error(kFileSelectionCanceled)); | 1153 Respond(Error(kFileSelectionCanceled)); |
1153 Release(); | 1154 Release(); |
1154 } | 1155 } |
1155 | 1156 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 update.extension_id, update.command_name, *update.keybinding); | 1446 update.extension_id, update.command_name, *update.keybinding); |
1446 } | 1447 } |
1447 | 1448 |
1448 return RespondNow(NoArguments()); | 1449 return RespondNow(NoArguments()); |
1449 } | 1450 } |
1450 | 1451 |
1451 | 1452 |
1452 } // namespace api | 1453 } // namespace api |
1453 | 1454 |
1454 } // namespace extensions | 1455 } // namespace extensions |
OLD | NEW |