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

Side by Side Diff: ios/chrome/browser/reading_list/url_downloader_unittest.mm

Issue 2650593003: Store distilled URL during distillation in Reading List on iOS (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « ios/chrome/browser/reading_list/url_downloader.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/reading_list/url_downloader.h" 5 #include "ios/chrome/browser/reading_list/url_downloader.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #import "base/mac/bind_objc_block.h" 10 #import "base/mac/bind_objc_block.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 if (offlineURLExists) { 79 if (offlineURLExists) {
80 DownloadCompletionHandler(url, std::string(), DOWNLOAD_EXISTS); 80 DownloadCompletionHandler(url, std::string(), DOWNLOAD_EXISTS);
81 return; 81 return;
82 } 82 }
83 distiller_.reset(new DistillerViewerTest( 83 distiller_.reset(new DistillerViewerTest(
84 url, 84 url,
85 base::Bind(&URLDownloader::DistillerCallback, base::Unretained(this)))); 85 base::Bind(&URLDownloader::DistillerCallback, base::Unretained(this))));
86 } 86 }
87 87
88 void OnEndDownload(const GURL& url, 88 void OnEndDownload(const GURL& url,
89 const GURL& distilled_url,
89 SuccessState success, 90 SuccessState success,
90 const base::FilePath& distilled_path, 91 const base::FilePath& distilled_path,
91 const std::string& title) { 92 const std::string& title) {
92 downloaded_files_.push_back(url); 93 downloaded_files_.push_back(url);
93 } 94 }
94 95
95 void OnEndRemove(const GURL& url, bool success) { 96 void OnEndRemove(const GURL& url, bool success) {
96 removed_files_.push_back(url); 97 removed_files_.push_back(url);
97 } 98 }
98 }; 99 };
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 ASSERT_TRUE(std::find(downloader_->downloaded_files_.begin(), 185 ASSERT_TRUE(std::find(downloader_->downloaded_files_.begin(),
185 downloader_->downloaded_files_.end(), 186 downloader_->downloaded_files_.end(),
186 url) != downloader_->downloaded_files_.end()); 187 url) != downloader_->downloaded_files_.end());
187 ASSERT_TRUE(std::find(downloader_->removed_files_.begin(), 188 ASSERT_TRUE(std::find(downloader_->removed_files_.begin(),
188 downloader_->removed_files_.end(), 189 downloader_->removed_files_.end(),
189 url) != downloader_->removed_files_.end()); 190 url) != downloader_->removed_files_.end());
190 ASSERT_TRUE(downloader_->CheckExistenceOfOfflineURLPagePath(url)); 191 ASSERT_TRUE(downloader_->CheckExistenceOfOfflineURLPagePath(url));
191 } 192 }
192 193
193 } // namespace 194 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/reading_list/url_downloader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698