| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Creates a dummy extension and sets the manifest's name to the item's | 44 // Creates a dummy extension and sets the manifest's name to the item's |
| 45 // localized name. | 45 // localized name. |
| 46 scoped_refptr<Extension> CreateDummyExtension(const BundleInstaller::Item& item, | 46 scoped_refptr<Extension> CreateDummyExtension(const BundleInstaller::Item& item, |
| 47 DictionaryValue* manifest) { | 47 DictionaryValue* manifest) { |
| 48 // We require localized names so we can have nice error messages when we can't | 48 // We require localized names so we can have nice error messages when we can't |
| 49 // parse an extension manifest. | 49 // parse an extension manifest. |
| 50 CHECK(!item.localized_name.empty()); | 50 CHECK(!item.localized_name.empty()); |
| 51 | 51 |
| 52 std::string error; | 52 std::string error; |
| 53 return Extension::Create(FilePath(), | 53 return Extension::Create(FilePath(), |
| 54 Extension::INTERNAL, | 54 Manifest::INTERNAL, |
| 55 *manifest, | 55 *manifest, |
| 56 Extension::NO_FLAGS, | 56 Extension::NO_FLAGS, |
| 57 item.id, | 57 item.id, |
| 58 &error); | 58 &error); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool IsAppPredicate(scoped_refptr<const Extension> extension) { | 61 bool IsAppPredicate(scoped_refptr<const Extension> extension) { |
| 62 return extension->is_app(); | 62 return extension->is_app(); |
| 63 } | 63 } |
| 64 | 64 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 void BundleInstaller::OnBrowserAdded(Browser* browser) {} | 347 void BundleInstaller::OnBrowserAdded(Browser* browser) {} |
| 348 | 348 |
| 349 void BundleInstaller::OnBrowserRemoved(Browser* browser) { | 349 void BundleInstaller::OnBrowserRemoved(Browser* browser) { |
| 350 if (browser_ == browser) | 350 if (browser_ == browser) |
| 351 browser_ = NULL; | 351 browser_ = NULL; |
| 352 } | 352 } |
| 353 | 353 |
| 354 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} | 354 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} |
| 355 | 355 |
| 356 } // namespace extensions | 356 } // namespace extensions |
| OLD | NEW |