Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 = JoinString(detail_lines_with_bullets, '\n'); 272 details = base::JoinString(detail_lines_with_bullets,
273 base::ASCIIToUTF16("\n"));
273 } 274 }
274 install_permissions.details.push_back(details); 275 install_permissions.details.push_back(details);
275 install_permissions.is_showing_details.push_back(false); 276 install_permissions.is_showing_details.push_back(false);
276 } 277 }
277 } 278 }
278 279
279 void ExtensionInstallPrompt::Prompt::SetIsShowingDetails( 280 void ExtensionInstallPrompt::Prompt::SetIsShowingDetails(
280 DetailsType type, 281 DetailsType type,
281 size_t index, 282 size_t index,
282 bool is_showing_details) { 283 bool is_showing_details) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 if (show_params_->WasParentDestroyed()) { 935 if (show_params_->WasParentDestroyed()) {
935 delegate_->InstallUIAbort(false); 936 delegate_->InstallUIAbort(false);
936 return; 937 return;
937 } 938 }
938 939
939 if (show_dialog_callback_.is_null()) 940 if (show_dialog_callback_.is_null())
940 GetDefaultShowDialogCallback().Run(show_params_.get(), delegate_, prompt_); 941 GetDefaultShowDialogCallback().Run(show_params_.get(), delegate_, prompt_);
941 else 942 else
942 show_dialog_callback_.Run(show_params_.get(), delegate_, prompt_); 943 show_dialog_callback_.Run(show_params_.get(), delegate_, prompt_);
943 } 944 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_message_bubble_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698