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/unpacked_installer.h" | 5 #include "chrome/browser/extensions/unpacked_installer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/threading/thread_restrictions.h" |
10 #include "chrome/browser/extensions/extension_install_prompt.h" | 11 #include "chrome/browser/extensions/extension_install_prompt.h" |
11 #include "chrome/browser/extensions/extension_install_ui.h" | 12 #include "chrome/browser/extensions/extension_install_ui.h" |
12 #include "chrome/browser/extensions/extension_prefs.h" | 13 #include "chrome/browser/extensions/extension_prefs.h" |
13 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
14 #include "chrome/browser/extensions/permissions_updater.h" | 15 #include "chrome/browser/extensions/permissions_updater.h" |
15 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
16 #include "chrome/common/extensions/extension_file_util.h" | 17 #include "chrome/common/extensions/extension_file_util.h" |
17 #include "chrome/common/string_ordinal.h" | 18 #include "chrome/common/string_ordinal.h" |
18 | 19 |
19 using content::BrowserThread; | 20 using content::BrowserThread; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 238 } |
238 | 239 |
239 PermissionsUpdater perms_updater(service_weak_->profile()); | 240 PermissionsUpdater perms_updater(service_weak_->profile()); |
240 perms_updater.GrantActivePermissions(extension, false); | 241 perms_updater.GrantActivePermissions(extension, false); |
241 service_weak_->OnExtensionInstalled(extension, | 242 service_weak_->OnExtensionInstalled(extension, |
242 false, // Not from web store. | 243 false, // Not from web store. |
243 StringOrdinal()); | 244 StringOrdinal()); |
244 } | 245 } |
245 | 246 |
246 } // namespace extensions | 247 } // namespace extensions |
OLD | NEW |