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

Unified Diff: content/browser/frame_host/navigation_entry_screenshot_manager.cc

Issue 178843004: [wip] Add some more state to RenderViewHost's lifetime. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar Created 6 years, 10 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
Index: content/browser/frame_host/navigation_entry_screenshot_manager.cc
diff --git a/content/browser/frame_host/navigation_entry_screenshot_manager.cc b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
index b2bf429dc0a6c66a34266a5267ed62267a8aacb6..85bd93595ce81b66c1fca19ce28ed4eed90efc70 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.cc
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
@@ -166,8 +166,7 @@ void NavigationEntryScreenshotManager::OnScreenshotTaken(int unique_id,
}
if (!success || bitmap.empty() || bitmap.isNull()) {
- if (!ClearScreenshot(entry))
- OnScreenshotSet(entry);
+ ClearScreenshot(entry);
return;
}
@@ -212,8 +211,8 @@ void NavigationEntryScreenshotManager::OnScreenshotEncodeComplete(
void NavigationEntryScreenshotManager::OnScreenshotSet(
NavigationEntryImpl* entry) {
- if (entry->screenshot().get())
- PurgeScreenshotsIfNecessary();
+ CHECK(entry->screenshot().get());
+ PurgeScreenshotsIfNecessary();
}
bool NavigationEntryScreenshotManager::ClearScreenshot(

Powered by Google App Engine
This is Rietveld 408576698