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

Side by Side Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/views/apps/app_info_dialog/app_info_summary_panel.h" 5 #include "chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 ShowAppHomePage(); 274 ShowAppHomePage();
275 } else if (source == licenses_link_) { 275 } else if (source == licenses_link_) {
276 DisplayLicenses(); 276 DisplayLicenses();
277 } else { 277 } else {
278 NOTREACHED(); 278 NOTREACHED();
279 } 279 }
280 } 280 }
281 281
282 void AppInfoSummaryPanel::StartCalculatingAppSize() { 282 void AppInfoSummaryPanel::StartCalculatingAppSize() {
283 base::PostTaskWithTraitsAndReplyWithResult( 283 base::PostTaskWithTraitsAndReplyWithResult(
284 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( 284 FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE},
285 base::TaskPriority::USER_VISIBLE),
286 base::Bind(&base::ComputeDirectorySize, app_->path()), 285 base::Bind(&base::ComputeDirectorySize, app_->path()),
287 base::Bind(&AppInfoSummaryPanel::OnAppSizeCalculated, AsWeakPtr())); 286 base::Bind(&AppInfoSummaryPanel::OnAppSizeCalculated, AsWeakPtr()));
288 } 287 }
289 288
290 void AppInfoSummaryPanel::OnAppSizeCalculated(int64_t app_size_in_bytes) { 289 void AppInfoSummaryPanel::OnAppSizeCalculated(int64_t app_size_in_bytes) {
291 const int one_mebibyte_in_bytes = 1024 * 1024; 290 const int one_mebibyte_in_bytes = 1024 * 1024;
292 if (app_size_in_bytes < one_mebibyte_in_bytes) { 291 if (app_size_in_bytes < one_mebibyte_in_bytes) {
293 size_value_->SetText( 292 size_value_->SetText(
294 l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_SIZE_SMALL_LABEL)); 293 l10n_util::GetStringUTF16(IDS_APPLICATION_INFO_SIZE_SMALL_LABEL));
295 } else { 294 } else {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 const extensions::Extension* imported_module = 350 const extensions::Extension* imported_module =
352 service->GetExtensionById(shared_module.extension_id, true); 351 service->GetExtensionById(shared_module.extension_id, true);
353 DCHECK(imported_module); 352 DCHECK(imported_module);
354 353
355 GURL about_page = extensions::ManifestURL::GetAboutPage(imported_module); 354 GURL about_page = extensions::ManifestURL::GetAboutPage(imported_module);
356 if (about_page != GURL::EmptyGURL()) 355 if (about_page != GURL::EmptyGURL())
357 license_urls.push_back(about_page); 356 license_urls.push_back(about_page);
358 } 357 }
359 return license_urls; 358 return license_urls;
360 } 359 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/browser/ui/views/chrome_views_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698