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/pending_extension_manager.h" | 5 #include "chrome/browser/extensions/pending_extension_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/version.h" | 9 #include "base/version.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/pending_extension_info.h" | 11 #include "chrome/browser/extensions/pending_extension_info.h" |
12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 | 14 |
15 #include <algorithm> | 15 #include <algorithm> |
16 | 16 |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 using extensions::Extension; | |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 // Install predicate used by AddFromExternalUpdateUrl(). | 21 // Install predicate used by AddFromExternalUpdateUrl(). |
23 bool AlwaysInstall(const Extension& extension) { | 22 bool AlwaysInstall(const extensions::Extension& extension) { |
24 return true; | 23 return true; |
25 } | 24 } |
26 | 25 |
27 } // namespace | 26 } // namespace |
28 | 27 |
| 28 namespace extensions { |
| 29 |
29 PendingExtensionManager::PendingExtensionManager( | 30 PendingExtensionManager::PendingExtensionManager( |
30 const ExtensionServiceInterface& service) | 31 const ExtensionServiceInterface& service) |
31 : service_(service) { | 32 : service_(service) { |
32 } | 33 } |
33 | 34 |
34 PendingExtensionManager::~PendingExtensionManager() {} | 35 PendingExtensionManager::~PendingExtensionManager() {} |
35 | 36 |
36 const PendingExtensionInfo* PendingExtensionManager::GetById( | 37 const PendingExtensionInfo* PendingExtensionManager::GetById( |
37 const std::string& id) const { | 38 const std::string& id) const { |
38 PendingExtensionList::const_iterator iter; | 39 PendingExtensionList::const_iterator iter; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 install_source)); | 236 install_source)); |
236 } | 237 } |
237 | 238 |
238 return true; | 239 return true; |
239 } | 240 } |
240 | 241 |
241 void PendingExtensionManager::AddForTesting( | 242 void PendingExtensionManager::AddForTesting( |
242 const PendingExtensionInfo& pending_extension_info) { | 243 const PendingExtensionInfo& pending_extension_info) { |
243 pending_extension_list_.push_back(pending_extension_info); | 244 pending_extension_list_.push_back(pending_extension_info); |
244 } | 245 } |
| 246 |
| 247 } // namespace extensions |
OLD | NEW |