| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |