| 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/extension_system.h" | 5 #include "chrome/browser/extensions/extension_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/string_tokenizer.h" | 10 #include "base/string_tokenizer.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 using content::BrowserThread; | 45 using content::BrowserThread; |
| 46 | 46 |
| 47 namespace extensions { | 47 namespace extensions { |
| 48 | 48 |
| 49 // | 49 // |
| 50 // ExtensionSystem | 50 // ExtensionSystem |
| 51 // | 51 // |
| 52 | 52 |
| 53 ExtensionSystem::ExtensionSystem() { | 53 ExtensionSystem::ExtensionSystem() { |
| 54 Feature::SetCurrentChannel(chrome::VersionInfo::GetChannel()); | 54 // Only set if it hasn't already been set (e.g. by a test). |
| 55 if (Feature::GetCurrentChannel() == Feature::GetDefaultChannel()) |
| 56 Feature::SetCurrentChannel(chrome::VersionInfo::GetChannel()); |
| 55 } | 57 } |
| 56 | 58 |
| 57 ExtensionSystem::~ExtensionSystem() { | 59 ExtensionSystem::~ExtensionSystem() { |
| 58 } | 60 } |
| 59 | 61 |
| 60 // static | 62 // static |
| 61 ExtensionSystem* ExtensionSystem::Get(Profile* profile) { | 63 ExtensionSystem* ExtensionSystem::Get(Profile* profile) { |
| 62 return ExtensionSystemFactory::GetForProfile(profile); | 64 return ExtensionSystemFactory::GetForProfile(profile); |
| 63 } | 65 } |
| 64 | 66 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 376 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
| 375 const std::string& extension_id, | 377 const std::string& extension_id, |
| 376 const extension_misc::UnloadedExtensionReason reason) { | 378 const extension_misc::UnloadedExtensionReason reason) { |
| 377 BrowserThread::PostTask( | 379 BrowserThread::PostTask( |
| 378 BrowserThread::IO, FROM_HERE, | 380 BrowserThread::IO, FROM_HERE, |
| 379 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), | 381 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), |
| 380 extension_id, reason)); | 382 extension_id, reason)); |
| 381 } | 383 } |
| 382 | 384 |
| 383 } // namespace extensions | 385 } // namespace extensions |
| OLD | NEW |