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

Side by Side Diff: trunk/src/chrome/browser/ui/search/instant_unload_handler.cc

Issue 135903002: Revert 244407 "InstantExtended: remove dead code related to the ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
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_unload_handler.h" 5 #include "chrome/browser/ui/search/instant_unload_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) { 97 void InstantUnloadHandler::Destroy(WebContentsDelegateImpl* delegate) {
98 ScopedVector<WebContentsDelegateImpl>::iterator i = 98 ScopedVector<WebContentsDelegateImpl>::iterator i =
99 std::find(delegates_.begin(), delegates_.end(), delegate); 99 std::find(delegates_.begin(), delegates_.end(), delegate);
100 DCHECK(i != delegates_.end()); 100 DCHECK(i != delegates_.end());
101 101
102 // The delegate's method is a caller on the stack, so schedule the deletion 102 // The delegate's method is a caller on the stack, so schedule the deletion
103 // for later. 103 // for later.
104 delegates_.weak_erase(i); 104 delegates_.weak_erase(i);
105 base::MessageLoop::current()->DeleteSoon(FROM_HERE, delegate); 105 base::MessageLoop::current()->DeleteSoon(FROM_HERE, delegate);
106 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698