| 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 #import "chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.
h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.
h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 file_contents.length()); | 63 file_contents.length()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 scoped_ptr<ExtensionInstallPrompt::Prompt> BuildExtensionInstallPrompt( | 66 scoped_ptr<ExtensionInstallPrompt::Prompt> BuildExtensionInstallPrompt( |
| 67 Extension* extension) { | 67 Extension* extension) { |
| 68 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( | 68 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( |
| 69 new ExtensionInstallPrompt::Prompt( | 69 new ExtensionInstallPrompt::Prompt( |
| 70 ExtensionInstallPrompt::INSTALL_PROMPT)); | 70 ExtensionInstallPrompt::INSTALL_PROMPT)); |
| 71 prompt->set_extension(extension); | 71 prompt->set_extension(extension); |
| 72 prompt->set_icon(LoadInstallPromptIcon()); | 72 prompt->set_icon(LoadInstallPromptIcon()); |
| 73 return prompt.Pass(); | 73 return prompt; |
| 74 } | 74 } |
| 75 | 75 |
| 76 scoped_ptr<ExtensionInstallPrompt::Prompt> | 76 scoped_ptr<ExtensionInstallPrompt::Prompt> |
| 77 BuildExtensionPostInstallPermissionsPrompt(Extension* extension) { | 77 BuildExtensionPostInstallPermissionsPrompt(Extension* extension) { |
| 78 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( | 78 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt( |
| 79 new ExtensionInstallPrompt::Prompt( | 79 new ExtensionInstallPrompt::Prompt( |
| 80 ExtensionInstallPrompt::POST_INSTALL_PERMISSIONS_PROMPT)); | 80 ExtensionInstallPrompt::POST_INSTALL_PERMISSIONS_PROMPT)); |
| 81 prompt->set_extension(extension); | 81 prompt->set_extension(extension); |
| 82 prompt->set_icon(LoadInstallPromptIcon()); | 82 prompt->set_icon(LoadInstallPromptIcon()); |
| 83 return prompt.Pass(); | 83 return prompt; |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace chrome | 86 } // namespace chrome |
| OLD | NEW |