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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_prompt2.cc

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/string_util.h" 5 #include "base/string_util.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/browser_window.h" 8 #include "chrome/browser/browser_window.h"
9 #include "chrome/browser/extensions/extension_install_ui.h" 9 #include "chrome/browser/extensions/extension_install_ui.h"
10 #include "chrome/browser/ui/views/window.h" 10 #include "chrome/browser/ui/views/window.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 heading_ = new views::Label(UTF16ToWide( 138 heading_ = new views::Label(UTF16ToWide(
139 l10n_util::GetStringFUTF16(IDS_EXTENSION_INSTALL_PROMPT_HEADING, 139 l10n_util::GetStringFUTF16(IDS_EXTENSION_INSTALL_PROMPT_HEADING,
140 UTF8ToUTF16(extension->name())))); 140 UTF8ToUTF16(extension->name()))));
141 heading_->SetFont(heading_->font().DeriveFont(kHeadingFontSizeDelta, 141 heading_->SetFont(heading_->font().DeriveFont(kHeadingFontSizeDelta,
142 gfx::Font::BOLD)); 142 gfx::Font::BOLD));
143 heading_->SetMultiLine(true); 143 heading_->SetMultiLine(true);
144 heading_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 144 heading_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
145 AddChildView(heading_); 145 AddChildView(heading_);
146 146
147 if (permissions.size() == 0) { 147 if (permissions.empty()) {
148 right_column_width_ = kNoPermissionsRightColumnWidth; 148 right_column_width_ = kNoPermissionsRightColumnWidth;
149 } else { 149 } else {
150 right_column_width_ = kPermissionBoxWidth; 150 right_column_width_ = kPermissionBoxWidth;
151 will_have_access_to_ = new views::Label(UTF16ToWide( 151 will_have_access_to_ = new views::Label(UTF16ToWide(
152 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO))); 152 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO)));
153 will_have_access_to_->SetMultiLine(true); 153 will_have_access_to_->SetMultiLine(true);
154 will_have_access_to_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 154 will_have_access_to_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
155 AddChildView(will_have_access_to_); 155 AddChildView(will_have_access_to_);
156 156
157 permission_box_ = new views::View(); 157 permission_box_ = new views::View();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 BrowserWindow* window = browser->window(); 320 BrowserWindow* window = browser->window();
321 if (!window) { 321 if (!window) {
322 delegate->InstallUIAbort(); 322 delegate->InstallUIAbort();
323 return; 323 return;
324 } 324 }
325 325
326 browser::CreateViewsWindow(window->GetNativeHandle(), gfx::Rect(), 326 browser::CreateViewsWindow(window->GetNativeHandle(), gfx::Rect(),
327 new InstallDialogContent2(delegate, extension, icon, permissions)) 327 new InstallDialogContent2(delegate, extension, icon, permissions))
328 ->Show(); 328 ->Show();
329 } 329 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698