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

Side by Side Diff: chrome/browser/instant/instant_controller.cc

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/instant/instant_controller.h" 5 #include "chrome/browser/instant/instant_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 void InstantController::ScheduleDestroy(InstantLoader* loader) { 500 void InstantController::ScheduleDestroy(InstantLoader* loader) {
501 loaders_to_destroy_.push_back(loader); 501 loaders_to_destroy_.push_back(loader);
502 if (!weak_factory_.HasWeakPtrs()) { 502 if (!weak_factory_.HasWeakPtrs()) {
503 MessageLoop::current()->PostTask( 503 MessageLoop::current()->PostTask(
504 FROM_HERE, base::Bind(&InstantController::DestroyLoaders, 504 FROM_HERE, base::Bind(&InstantController::DestroyLoaders,
505 weak_factory_.GetWeakPtr())); 505 weak_factory_.GetWeakPtr()));
506 } 506 }
507 } 507 }
508 508
509 void InstantController::DestroyLoaders() { 509 void InstantController::DestroyLoaders() {
510 loaders_to_destroy_.reset(); 510 loaders_to_destroy_.clear();
511 } 511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698