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/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "third_party/skia/include/core/SkBitmap.h" | 43 #include "third_party/skia/include/core/SkBitmap.h" |
44 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
45 #include "ui/base/resource/resource_bundle.h" | 45 #include "ui/base/resource/resource_bundle.h" |
46 | 46 |
47 using content::BrowserThread; | 47 using content::BrowserThread; |
48 using content::UserMetricsAction; | 48 using content::UserMetricsAction; |
49 using extensions::PermissionsUpdater; | 49 using extensions::PermissionsUpdater; |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
| 53 // TODO(jstritar): this whitelist is not profile aware. |
53 struct Whitelist { | 54 struct Whitelist { |
54 Whitelist() {} | 55 Whitelist() {} |
55 std::set<std::string> ids; | 56 std::set<std::string> ids; |
56 std::map<std::string, linked_ptr<CrxInstaller::WhitelistEntry> > entries; | 57 std::map<std::string, linked_ptr<CrxInstaller::WhitelistEntry> > entries; |
57 }; | 58 }; |
58 | 59 |
59 static base::LazyInstance<Whitelist> | 60 static base::LazyInstance<Whitelist> |
60 g_whitelisted_install_data = LAZY_INSTANCE_INITIALIZER; | 61 g_whitelisted_install_data = LAZY_INSTANCE_INITIALIZER; |
61 | 62 |
62 } // namespace | 63 } // namespace |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 // Some users (such as the download shelf) need to know when a | 607 // Some users (such as the download shelf) need to know when a |
607 // CRXInstaller is done. Listening for the EXTENSION_* events | 608 // CRXInstaller is done. Listening for the EXTENSION_* events |
608 // is problematic because they don't know anything about the | 609 // is problematic because they don't know anything about the |
609 // extension before it is unpacked, so they cannot filter based | 610 // extension before it is unpacked, so they cannot filter based |
610 // on the extension. | 611 // on the extension. |
611 content::NotificationService::current()->Notify( | 612 content::NotificationService::current()->Notify( |
612 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 613 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
613 content::Source<CrxInstaller>(this), | 614 content::Source<CrxInstaller>(this), |
614 content::Details<const Extension>(extension)); | 615 content::Details<const Extension>(extension)); |
615 } | 616 } |
OLD | NEW |