Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: chrome/browser/extensions/extension_system.cc

Issue 10854177: Only set the channel from ExtensionSystem if there hasn't been one set already. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/features/feature.h » ('j') | chrome/common/extensions/features/feature.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698