OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions_service.h" | 5 #include "chrome/browser/extensions/extensions_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 << "id: " << extension_id; | 539 << "id: " << extension_id; |
540 return false; | 540 return false; |
541 } | 541 } |
542 | 542 |
543 return true; | 543 return true; |
544 } | 544 } |
545 | 545 |
546 ExtensionsService::ExtensionsService(Profile* profile, | 546 ExtensionsService::ExtensionsService(Profile* profile, |
547 const CommandLine* command_line, | 547 const CommandLine* command_line, |
548 const FilePath& install_directory, | 548 const FilePath& install_directory, |
| 549 ExtensionPrefs* extension_prefs, |
549 bool autoupdate_enabled) | 550 bool autoupdate_enabled) |
550 : profile_(profile), | 551 : profile_(profile), |
551 extension_prefs_(new ExtensionPrefs(profile->GetPrefs(), | 552 extension_prefs_(extension_prefs), |
552 install_directory)), | |
553 install_directory_(install_directory), | 553 install_directory_(install_directory), |
554 extensions_enabled_(true), | 554 extensions_enabled_(true), |
555 show_extensions_prompts_(true), | 555 show_extensions_prompts_(true), |
556 ready_(false), | 556 ready_(false), |
557 ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)), | 557 ALLOW_THIS_IN_INITIALIZER_LIST(toolbar_model_(this)), |
558 default_apps_(profile->GetPrefs()), | 558 default_apps_(profile->GetPrefs()), |
559 event_routers_initialized_(false) { | 559 event_routers_initialized_(false) { |
560 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 560 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
561 | 561 |
562 // Figure out if extension installation should be enabled. | 562 // Figure out if extension installation should be enabled. |
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 } | 2071 } |
2072 | 2072 |
2073 void ExtensionsService::SetBeingUpgraded(const Extension* extension, | 2073 void ExtensionsService::SetBeingUpgraded(const Extension* extension, |
2074 bool value) { | 2074 bool value) { |
2075 extension_runtime_data_[extension->id()].being_upgraded = value; | 2075 extension_runtime_data_[extension->id()].being_upgraded = value; |
2076 } | 2076 } |
2077 | 2077 |
2078 PropertyBag* ExtensionsService::GetPropertyBag(const Extension* extension) { | 2078 PropertyBag* ExtensionsService::GetPropertyBag(const Extension* extension) { |
2079 return &extension_runtime_data_[extension->id()].property_bag; | 2079 return &extension_runtime_data_[extension->id()].property_bag; |
2080 } | 2080 } |
OLD | NEW |