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

Side by Side Diff: chrome/browser/ui/search/instant_loader.cc

Issue 14161020: InstantExtended: Fixing a crash when the stale timer could fire after InstantController is deleted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/ui/search/instant_loader.h" 5 #include "chrome/browser/ui/search/instant_loader.h"
6 6
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/history/history_tab_helper.h" 10 #include "chrome/browser/history/history_tab_helper.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 &contents_->GetController())); 114 &contents_->GetController()));
115 #endif 115 #endif
116 116
117 // When the WebContents finishes loading it should be checked to ensure that 117 // When the WebContents finishes loading it should be checked to ensure that
118 // it is in the instant process. 118 // it is in the instant process.
119 registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 119 registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
120 content::Source<content::WebContents>(contents_.get())); 120 content::Source<content::WebContents>(contents_.get()));
121 } 121 }
122 122
123 scoped_ptr<content::WebContents> InstantLoader::ReleaseContents() { 123 scoped_ptr<content::WebContents> InstantLoader::ReleaseContents() {
124 stale_page_timer_.Stop();
124 contents_->SetDelegate(NULL); 125 contents_->SetDelegate(NULL);
125 126
126 // Undo tab helper work done in SetContents(). 127 // Undo tab helper work done in SetContents().
127 128
128 BlockedContentTabHelper::FromWebContents(contents())-> 129 BlockedContentTabHelper::FromWebContents(contents())->
129 SetAllContentsBlocked(false); 130 SetAllContentsBlocked(false);
130 TabSpecificContentSettings::FromWebContents(contents())-> 131 TabSpecificContentSettings::FromWebContents(contents())->
131 SetPopupsBlocked(false); 132 SetPopupsBlocked(false);
132 133
133 CoreTabHelper::FromWebContents(contents())->set_delegate(NULL); 134 CoreTabHelper::FromWebContents(contents())->set_delegate(NULL);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 229
229 bool InstantLoader::OnGoToEntryOffset(int /* offset */) { 230 bool InstantLoader::OnGoToEntryOffset(int /* offset */) {
230 return false; 231 return false;
231 } 232 }
232 233
233 content::WebContents* InstantLoader::OpenURLFromTab( 234 content::WebContents* InstantLoader::OpenURLFromTab(
234 content::WebContents* source, 235 content::WebContents* source,
235 const content::OpenURLParams& params) { 236 const content::OpenURLParams& params) {
236 return delegate_->OpenURLFromTab(source, params); 237 return delegate_->OpenURLFromTab(source, params);
237 } 238 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698