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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(const std::string& id, |
331 const std::string& error) { | 331 const std::string& error, |
| 332 bool cancelled) { |
332 items_[id].state = Item::STATE_FAILED; | 333 items_[id].state = Item::STATE_FAILED; |
333 | 334 |
334 ExtensionList::iterator i = std::find_if( | 335 ExtensionList::iterator i = std::find_if( |
335 dummy_extensions_.begin(), dummy_extensions_.end(), MatchIdFunctor(id)); | 336 dummy_extensions_.begin(), dummy_extensions_.end(), MatchIdFunctor(id)); |
336 CHECK(dummy_extensions_.end() != i); | 337 CHECK(dummy_extensions_.end() != i); |
337 dummy_extensions_.erase(i); | 338 dummy_extensions_.erase(i); |
338 | 339 |
339 ShowInstalledBubbleIfDone(); | 340 ShowInstalledBubbleIfDone(); |
340 } | 341 } |
341 | 342 |
342 void BundleInstaller::OnBrowserAdded(Browser* browser) {} | 343 void BundleInstaller::OnBrowserAdded(Browser* browser) {} |
343 | 344 |
344 void BundleInstaller::OnBrowserRemoved(Browser* browser) { | 345 void BundleInstaller::OnBrowserRemoved(Browser* browser) { |
345 if (browser_ == browser) | 346 if (browser_ == browser) |
346 browser_ = NULL; | 347 browser_ = NULL; |
347 } | 348 } |
348 | 349 |
349 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} | 350 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} |
350 | 351 |
351 } // namespace extensions | 352 } // namespace extensions |
OLD | NEW |