| 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/extensions/bundle_installer.h" | 5 #include "chrome/browser/extensions/bundle_installer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 ReportCanceled(user_initiated); | 321 ReportCanceled(user_initiated); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void BundleInstaller::OnExtensionInstallSuccess(const std::string& id) { | 324 void BundleInstaller::OnExtensionInstallSuccess(const std::string& id) { |
| 325 items_[id].state = Item::STATE_INSTALLED; | 325 items_[id].state = Item::STATE_INSTALLED; |
| 326 | 326 |
| 327 ShowInstalledBubbleIfDone(); | 327 ShowInstalledBubbleIfDone(); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void BundleInstaller::OnExtensionInstallFailure(const std::string& id, | 330 void BundleInstaller::OnExtensionInstallFailure( |
| 331 const std::string& error) { | 331 const std::string& id, |
| 332 const std::string& error, |
| 333 WebstoreInstaller::FailureReason reason) { |
| 332 items_[id].state = Item::STATE_FAILED; | 334 items_[id].state = Item::STATE_FAILED; |
| 333 | 335 |
| 334 ExtensionList::iterator i = std::find_if( | 336 ExtensionList::iterator i = std::find_if( |
| 335 dummy_extensions_.begin(), dummy_extensions_.end(), MatchIdFunctor(id)); | 337 dummy_extensions_.begin(), dummy_extensions_.end(), MatchIdFunctor(id)); |
| 336 CHECK(dummy_extensions_.end() != i); | 338 CHECK(dummy_extensions_.end() != i); |
| 337 dummy_extensions_.erase(i); | 339 dummy_extensions_.erase(i); |
| 338 | 340 |
| 339 ShowInstalledBubbleIfDone(); | 341 ShowInstalledBubbleIfDone(); |
| 340 } | 342 } |
| 341 | 343 |
| 342 void BundleInstaller::OnBrowserAdded(Browser* browser) {} | 344 void BundleInstaller::OnBrowserAdded(Browser* browser) {} |
| 343 | 345 |
| 344 void BundleInstaller::OnBrowserRemoved(Browser* browser) { | 346 void BundleInstaller::OnBrowserRemoved(Browser* browser) { |
| 345 if (browser_ == browser) | 347 if (browser_ == browser) |
| 346 browser_ = NULL; | 348 browser_ = NULL; |
| 347 } | 349 } |
| 348 | 350 |
| 349 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} | 351 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} |
| 350 | 352 |
| 351 } // namespace extensions | 353 } // namespace extensions |
| OLD | NEW |