OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 return false; | 572 return false; |
573 } | 573 } |
574 | 574 |
575 return true; | 575 return true; |
576 } | 576 } |
577 | 577 |
578 ExtensionService::ExtensionService(Profile* profile, | 578 ExtensionService::ExtensionService(Profile* profile, |
579 const CommandLine* command_line, | 579 const CommandLine* command_line, |
580 const FilePath& install_directory, | 580 const FilePath& install_directory, |
581 ExtensionPrefs* extension_prefs, | 581 ExtensionPrefs* extension_prefs, |
582 ExtensionSettings* extension_settings, | |
583 bool autoupdate_enabled, | 582 bool autoupdate_enabled, |
584 bool extensions_enabled) | 583 bool extensions_enabled) |
585 : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 584 : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
586 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 585 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
587 profile_(profile), | 586 profile_(profile), |
588 extension_prefs_(extension_prefs), | 587 extension_prefs_(extension_prefs), |
589 extension_settings_(extension_settings), | 588 extension_settings_( |
| 589 profile->GetPath().AppendASCII(kSettingsDirectoryName)), |
590 pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 590 pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
591 install_directory_(install_directory), | 591 install_directory_(install_directory), |
592 extensions_enabled_(extensions_enabled), | 592 extensions_enabled_(extensions_enabled), |
593 show_extensions_prompts_(true), | 593 show_extensions_prompts_(true), |
594 ready_(false), | 594 ready_(false), |
595 toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 595 toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
596 permissions_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 596 permissions_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
597 apps_promo_(profile->GetPrefs()), | 597 apps_promo_(profile->GetPrefs()), |
598 event_routers_initialized_(false) { | 598 event_routers_initialized_(false) { |
599 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 599 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 } | 1646 } |
1647 | 1647 |
1648 Profile* ExtensionService::profile() { | 1648 Profile* ExtensionService::profile() { |
1649 return profile_; | 1649 return profile_; |
1650 } | 1650 } |
1651 | 1651 |
1652 ExtensionPrefs* ExtensionService::extension_prefs() { | 1652 ExtensionPrefs* ExtensionService::extension_prefs() { |
1653 return extension_prefs_; | 1653 return extension_prefs_; |
1654 } | 1654 } |
1655 | 1655 |
1656 ExtensionSettings* ExtensionService::extension_settings() { | 1656 ExtensionSettingsUIWrapper* ExtensionService::extension_settings() { |
1657 return extension_settings_; | 1657 return &extension_settings_; |
1658 } | 1658 } |
1659 | 1659 |
1660 ExtensionContentSettingsStore* | 1660 ExtensionContentSettingsStore* |
1661 ExtensionService::GetExtensionContentSettingsStore() { | 1661 ExtensionService::GetExtensionContentSettingsStore() { |
1662 return extension_prefs()->content_settings_store(); | 1662 return extension_prefs()->content_settings_store(); |
1663 } | 1663 } |
1664 | 1664 |
1665 ExtensionUpdater* ExtensionService::updater() { | 1665 ExtensionUpdater* ExtensionService::updater() { |
1666 return updater_.get(); | 1666 return updater_.get(); |
1667 } | 1667 } |
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2871 | 2871 |
2872 ExtensionService::NaClModuleInfoList::iterator | 2872 ExtensionService::NaClModuleInfoList::iterator |
2873 ExtensionService::FindNaClModule(const GURL& url) { | 2873 ExtensionService::FindNaClModule(const GURL& url) { |
2874 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2874 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2875 iter != nacl_module_list_.end(); ++iter) { | 2875 iter != nacl_module_list_.end(); ++iter) { |
2876 if (iter->url == url) | 2876 if (iter->url == url) |
2877 return iter; | 2877 return iter; |
2878 } | 2878 } |
2879 return nacl_module_list_.end(); | 2879 return nacl_module_list_.end(); |
2880 } | 2880 } |
OLD | NEW |