| 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/extension_install_prompt.h" | 5 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 install_permissions.permissions.push_back(str.message); | 262 install_permissions.permissions.push_back(str.message); |
| 263 // Add a dash to the front of each permission detail. | 263 // Add a dash to the front of each permission detail. |
| 264 base::string16 details; | 264 base::string16 details; |
| 265 if (!str.submessages.empty()) { | 265 if (!str.submessages.empty()) { |
| 266 std::vector<base::string16> detail_lines_with_bullets; | 266 std::vector<base::string16> detail_lines_with_bullets; |
| 267 for (const auto& detail_line : str.submessages) { | 267 for (const auto& detail_line : str.submessages) { |
| 268 detail_lines_with_bullets.push_back(base::ASCIIToUTF16("- ") + | 268 detail_lines_with_bullets.push_back(base::ASCIIToUTF16("- ") + |
| 269 detail_line); | 269 detail_line); |
| 270 } | 270 } |
| 271 | 271 |
| 272 details = base::JoinString(detail_lines_with_bullets, | 272 details = JoinString(detail_lines_with_bullets, '\n'); |
| 273 base::ASCIIToUTF16("\n")); | |
| 274 } | 273 } |
| 275 install_permissions.details.push_back(details); | 274 install_permissions.details.push_back(details); |
| 276 install_permissions.is_showing_details.push_back(false); | 275 install_permissions.is_showing_details.push_back(false); |
| 277 } | 276 } |
| 278 } | 277 } |
| 279 | 278 |
| 280 void ExtensionInstallPrompt::Prompt::SetIsShowingDetails( | 279 void ExtensionInstallPrompt::Prompt::SetIsShowingDetails( |
| 281 DetailsType type, | 280 DetailsType type, |
| 282 size_t index, | 281 size_t index, |
| 283 bool is_showing_details) { | 282 bool is_showing_details) { |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 if (show_params_->WasParentDestroyed()) { | 934 if (show_params_->WasParentDestroyed()) { |
| 936 delegate_->InstallUIAbort(false); | 935 delegate_->InstallUIAbort(false); |
| 937 return; | 936 return; |
| 938 } | 937 } |
| 939 | 938 |
| 940 if (show_dialog_callback_.is_null()) | 939 if (show_dialog_callback_.is_null()) |
| 941 GetDefaultShowDialogCallback().Run(show_params_.get(), delegate_, prompt_); | 940 GetDefaultShowDialogCallback().Run(show_params_.get(), delegate_, prompt_); |
| 942 else | 941 else |
| 943 show_dialog_callback_.Run(show_params_.get(), delegate_, prompt_); | 942 show_dialog_callback_.Run(show_params_.get(), delegate_, prompt_); |
| 944 } | 943 } |
| OLD | NEW |