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

Unified Diff: components/quirks/quirks_manager.cc

Issue 2365903004: Don't send Quirks Server requests for product_id = 0 (Closed)
Patch Set: Fix ash unit test Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/display_color_manager_chromeos_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/quirks/quirks_manager.cc
diff --git a/components/quirks/quirks_manager.cc b/components/quirks/quirks_manager.cc
index b5308001504bdb5629acb6ef636010eb49dd2855..df84c8f691f7948193ce8a85bff0076ee8d3efc1 100644
--- a/components/quirks/quirks_manager.cc
+++ b/components/quirks/quirks_manager.cc
@@ -137,6 +137,12 @@ void QuirksManager::RequestIccProfilePath(
const RequestFinishedCallback& on_request_finished) {
DCHECK(thread_checker_.CalledOnValidThread());
+ if (!product_id) {
+ VLOG(1) << "Could not determine display information (product id = 0)";
+ on_request_finished.Run(base::FilePath(), false);
+ return;
+ }
+
std::string name = IdToFileName(product_id);
base::PostTaskAndReplyWithResult(
blocking_pool_.get(), FROM_HERE,
« no previous file with comments | « ash/display/display_color_manager_chromeos_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698