Lines Matching defs:page_num
77 void DistillerImpl::AddToDistillationQueue(int page_num, const GURL& url) {
78 if (!IsPageNumberInUse(page_num) && url.is_valid() &&
81 waiting_pages_[page_num] = url;
85 bool DistillerImpl::IsPageNumberInUse(int page_num) const {
86 return waiting_pages_.find(page_num) != waiting_pages_.end() ||
87 started_pages_index_.find(page_num) != started_pages_index_.end() ||
88 finished_pages_index_.find(page_num) != finished_pages_index_.end();
115 int page_num = front->first;
120 DCHECK(started_pages_index_.find(page_num) == started_pages_index_.end());
121 DCHECK(finished_pages_index_.find(page_num) == finished_pages_index_.end());
124 started_pages_index_[page_num] = pages_.size() - 1;
130 page_num,
136 int page_num,
140 DCHECK(started_pages_index_.find(page_num) != started_pages_index_.end());
144 GetPageAtIndex(started_pages_index_[page_num]);
147 page_data->page_num = page_num;
172 AddToDistillationQueue(page_num + 1, next_page_url);
180 AddToDistillationQueue(page_num - 1, prev_page_url);
188 base::IntToString(page_num + 1) + "_" + base::IntToString(img_num);
189 FetchImage(page_num, image_id, distiller_result->image_urls(img_num));
192 AddPageIfDone(page_num);
195 started_pages_index_.erase(page_num);
200 void DistillerImpl::FetchImage(int page_num,
203 DCHECK(started_pages_index_.find(page_num) != started_pages_index_.end());
204 DistilledPageData* page_data = GetPageAtIndex(started_pages_index_[page_num]);
212 page_num,
217 void DistillerImpl::OnFetchImageDone(int page_num,
221 DCHECK(started_pages_index_.find(page_num) != started_pages_index_.end());
222 DistilledPageData* page_data = GetPageAtIndex(started_pages_index_[page_num]);
241 AddPageIfDone(page_num);
244 void DistillerImpl::AddPageIfDone(int page_num) {
245 DCHECK(started_pages_index_.find(page_num) != started_pages_index_.end());
246 DCHECK(finished_pages_index_.find(page_num) == finished_pages_index_.end());
247 DistilledPageData* page_data = GetPageAtIndex(started_pages_index_[page_num]);
249 finished_pages_index_[page_num] = started_pages_index_[page_num];
250 started_pages_index_.erase(page_num);