New issue
Advanced search Search tips

Issue 668174 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 666645



Sign in to add a comment

GetPagesMatchingQuery returns empty result before the model is loaded

Project Member Reported by vitaliii@chromium.org, Nov 23 2016

Issue description

Version: ToT
OS: Android

Currently if we call GetPagesMatchingQuery() before offline_pages_model->is_loaded() == true, we get empty result. This is not a problem, since we can do the call on OfflinePageModelLoaded(), but all other methods inside the model seem to use RunWhenLoaded

https://cs.chromium.org/chromium/src/components/offline_pages/offline_page_model_impl.cc?q=RunWhenLoaded&sq=package:chromium&l=375&dr=C

so it seems a bit odd that GetPagesMatchingQuery.

Is this intended?
 
No it is not. I think a guard was not put in place in the process of promoting this method from private to public.
Labels: -Pri-3 Pri-2
Owner: fgor...@chromium.org
Status: Assigned (was: Untriaged)
Do you need this for M56? Or can it be solved in M57 only?
M57 only.
Blocking: 666645
Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e3282abc2d498c63720bb7262bccf14013bd2484

commit e3282abc2d498c63720bb7262bccf14013bd2484
Author: fgorski <fgorski@chromium.org>
Date: Mon Nov 28 21:49:31 2016

[Offline pages] Preventing GetPagesMatchingQuery from running before model is loaded

* When making a function to get offline pages using query public, we
  missed making it run only when the model is loaded.
  This patch fixes that by deferring the actually execution after the
  model is loaded.

BUG= 668174 

Review-Url: https://codereview.chromium.org/2536573003
Cr-Commit-Position: refs/heads/master@{#434726}

[modify] https://crrev.com/e3282abc2d498c63720bb7262bccf14013bd2484/components/offline_pages/offline_page_model_impl.cc
[modify] https://crrev.com/e3282abc2d498c63720bb7262bccf14013bd2484/components/offline_pages/offline_page_model_impl.h
[modify] https://crrev.com/e3282abc2d498c63720bb7262bccf14013bd2484/components/offline_pages/offline_page_model_impl_unittest.cc

Labels: OS-Android
Status: Fixed (was: Started)

Sign in to add a comment