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

Side by Side Diff: chrome/browser/banners/app_banner_data_fetcher.cc

Issue 1835063002: DevTools: make app banner debug messages report with different severity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win fixed Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/banners/app_banner_data_fetcher.h" 5 #include "chrome/browser/banners/app_banner_data_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 346 }
347 347
348 void AppBannerDataFetcher::OnHasServiceWorker( 348 void AppBannerDataFetcher::OnHasServiceWorker(
349 content::WebContents* web_contents) { 349 content::WebContents* web_contents) {
350 GURL icon_url = ManifestIconSelector::FindBestMatchingIcon( 350 GURL icon_url = ManifestIconSelector::FindBestMatchingIcon(
351 web_app_data_.icons, ideal_icon_size_in_dp_, minimum_icon_size_in_dp_); 351 web_app_data_.icons, ideal_icon_size_in_dp_, minimum_icon_size_in_dp_);
352 352
353 if (icon_url.is_empty()) { 353 if (icon_url.is_empty()) {
354 OutputDeveloperNotShownMessage( 354 OutputDeveloperNotShownMessage(
355 web_contents, 355 web_contents,
356 kNoIconMatchingRequirements,
356 base::IntToString(ManifestIconSelector::ConvertIconSizeFromDpToPx( 357 base::IntToString(ManifestIconSelector::ConvertIconSizeFromDpToPx(
357 minimum_icon_size_in_dp_)) + 358 minimum_icon_size_in_dp_)),
358 kNoIconMatchingRequirements,
359 is_debug_mode_); 359 is_debug_mode_);
360 Cancel(); 360 Cancel();
361 } else if (!FetchAppIcon(web_contents, icon_url)) { 361 } else if (!FetchAppIcon(web_contents, icon_url)) {
362 OutputDeveloperNotShownMessage(web_contents, kCannotDownloadIcon, 362 OutputDeveloperNotShownMessage(web_contents, kCannotDownloadIcon,
363 is_debug_mode_); 363 is_debug_mode_);
364 Cancel(); 364 Cancel();
365 } 365 }
366 } 366 }
367 367
368 bool AppBannerDataFetcher::FetchAppIcon(content::WebContents* web_contents, 368 bool AppBannerDataFetcher::FetchAppIcon(content::WebContents* web_contents,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 if (!DoesManifestContainRequiredIcon(manifest)) { 466 if (!DoesManifestContainRequiredIcon(manifest)) {
467 OutputDeveloperNotShownMessage(web_contents, kManifestMissingSuitableIcon, 467 OutputDeveloperNotShownMessage(web_contents, kManifestMissingSuitableIcon,
468 is_debug_mode); 468 is_debug_mode);
469 return false; 469 return false;
470 } 470 }
471 return true; 471 return true;
472 } 472 }
473 473
474 } // namespace banners 474 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager_android.cc ('k') | chrome/browser/banners/app_banner_debug_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698