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

Unified Diff: components/offline_pages/offline_page_test_store.cc

Issue 1521193002: [Offline pages] Refactor URL conversions from TabAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing feedback, updating tests, moving functions to a static class Created 5 years 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
Index: components/offline_pages/offline_page_test_store.cc
diff --git a/components/offline_pages/offline_page_test_store.cc b/components/offline_pages/offline_page_test_store.cc
index 755191ce2b70565b5c773cdc999454b0e5833b36..8c8ea9438e09953cd41e6b3488395cd6cd6535b4 100644
--- a/components/offline_pages/offline_page_test_store.cc
+++ b/components/offline_pages/offline_page_test_store.cc
@@ -41,7 +41,8 @@ void OfflinePageTestStore::AddOrUpdateOfflinePage(
bool result = scenario_ != TestScenario::WRITE_FAILED;
if (result)
offline_pages_[offline_page.bookmark_id] = offline_page;
- task_runner_->PostTask(FROM_HERE, base::Bind(callback, result));
+ if (!callback.is_null())
+ task_runner_->PostTask(FROM_HERE, base::Bind(callback, result));
}
void OfflinePageTestStore::RemoveOfflinePages(

Powered by Google App Engine
This is Rietveld 408576698