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

Unified Diff: content/browser/web_contents/web_contents_screenshot_manager.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl_unittest.cc ('k') | content/child/child_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_screenshot_manager.cc
diff --git a/content/browser/web_contents/web_contents_screenshot_manager.cc b/content/browser/web_contents/web_contents_screenshot_manager.cc
index 49cb0c6ba9104c7bf54f0cb9f4e423eb80812695..b2eeb464265df15ef11bd5921187d99b2ae69ecc 100644
--- a/content/browser/web_contents/web_contents_screenshot_manager.cc
+++ b/content/browser/web_contents/web_contents_screenshot_manager.cc
@@ -168,7 +168,7 @@ int WebContentsScreenshotManager::GetScreenshotCount() const {
for (int i = 0; i < entry_count; ++i) {
NavigationEntryImpl* entry =
NavigationEntryImpl::FromNavigationEntry(owner_->GetEntryAtIndex(i));
- if (entry->screenshot())
+ if (entry->screenshot().get())
screenshot_count++;
}
return screenshot_count;
@@ -197,7 +197,7 @@ void WebContentsScreenshotManager::OnScreenshotSet(NavigationEntryImpl* entry) {
}
bool WebContentsScreenshotManager::ClearScreenshot(NavigationEntryImpl* entry) {
- if (!entry->screenshot())
+ if (!entry->screenshot().get())
return false;
entry->SetScreenshotPNGData(NULL);
@@ -214,8 +214,8 @@ void WebContentsScreenshotManager::PurgeScreenshotsIfNecessary() {
const int current = owner_->GetCurrentEntryIndex();
const int num_entries = owner_->GetEntryCount();
int available_slots = kMaxScreenshots;
- if (NavigationEntryImpl::FromNavigationEntry(
- owner_->GetEntryAtIndex(current))->screenshot()) {
+ if (NavigationEntryImpl::FromNavigationEntry(owner_->GetEntryAtIndex(current))
+ ->screenshot().get()) {
--available_slots;
}
@@ -234,7 +234,7 @@ void WebContentsScreenshotManager::PurgeScreenshotsIfNecessary() {
if (back >= 0) {
NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
owner_->GetEntryAtIndex(back));
- if (entry->screenshot())
+ if (entry->screenshot().get())
--available_slots;
--back;
}
@@ -242,7 +242,7 @@ void WebContentsScreenshotManager::PurgeScreenshotsIfNecessary() {
if (available_slots > 0 && forward < num_entries) {
NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
owner_->GetEntryAtIndex(forward));
- if (entry->screenshot())
+ if (entry->screenshot().get())
--available_slots;
++forward;
}
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl_unittest.cc ('k') | content/child/child_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698