OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 namespace { | 47 namespace { |
48 | 48 |
49 struct Whitelist { | 49 struct Whitelist { |
50 Whitelist() {} | 50 Whitelist() {} |
51 std::set<std::string> ids; | 51 std::set<std::string> ids; |
52 std::map<std::string, linked_ptr<CrxInstaller::WhitelistEntry> > entries; | 52 std::map<std::string, linked_ptr<CrxInstaller::WhitelistEntry> > entries; |
53 }; | 53 }; |
54 | 54 |
55 static base::LazyInstance<Whitelist> | 55 static base::LazyInstance<Whitelist> |
56 g_whitelisted_install_data(base::LINKER_INITIALIZED); | 56 g_whitelisted_install_data = LAZY_INSTANCE_INITIALIZER; |
57 | 57 |
58 } // namespace | 58 } // namespace |
59 | 59 |
60 CrxInstaller::WhitelistEntry::WhitelistEntry() | 60 CrxInstaller::WhitelistEntry::WhitelistEntry() |
61 : use_app_installed_bubble(false), | 61 : use_app_installed_bubble(false), |
62 skip_post_install_ui(false) {} | 62 skip_post_install_ui(false) {} |
63 CrxInstaller::WhitelistEntry::~WhitelistEntry() {} | 63 CrxInstaller::WhitelistEntry::~WhitelistEntry() {} |
64 | 64 |
65 // static | 65 // static |
66 scoped_refptr<CrxInstaller> CrxInstaller::Create( | 66 scoped_refptr<CrxInstaller> CrxInstaller::Create( |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 // Some users (such as the download shelf) need to know when a | 599 // Some users (such as the download shelf) need to know when a |
600 // CRXInstaller is done. Listening for the EXTENSION_* events | 600 // CRXInstaller is done. Listening for the EXTENSION_* events |
601 // is problematic because they don't know anything about the | 601 // is problematic because they don't know anything about the |
602 // extension before it is unpacked, so they can not filter based | 602 // extension before it is unpacked, so they can not filter based |
603 // on the extension. | 603 // on the extension. |
604 content::NotificationService::current()->Notify( | 604 content::NotificationService::current()->Notify( |
605 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 605 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
606 content::Source<CrxInstaller>(this), | 606 content::Source<CrxInstaller>(this), |
607 content::NotificationService::NoDetails()); | 607 content::NotificationService::NoDetails()); |
608 } | 608 } |
OLD | NEW |