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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 return false; | 574 return false; |
575 } | 575 } |
576 | 576 |
577 return true; | 577 return true; |
578 } | 578 } |
579 | 579 |
580 ExtensionService::ExtensionService(Profile* profile, | 580 ExtensionService::ExtensionService(Profile* profile, |
581 const CommandLine* command_line, | 581 const CommandLine* command_line, |
582 const FilePath& install_directory, | 582 const FilePath& install_directory, |
583 ExtensionPrefs* extension_prefs, | 583 ExtensionPrefs* extension_prefs, |
584 ExtensionSettings* extension_settings, | |
585 bool autoupdate_enabled, | 584 bool autoupdate_enabled, |
586 bool extensions_enabled) | 585 bool extensions_enabled) |
587 : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 586 : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
588 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 587 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
589 profile_(profile), | 588 profile_(profile), |
590 extension_prefs_(extension_prefs), | 589 extension_prefs_(extension_prefs), |
591 extension_settings_(extension_settings), | 590 extension_settings_( |
| 591 profile->GetPath().AppendASCII(kSettingsDirectoryName)), |
592 pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 592 pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
593 install_directory_(install_directory), | 593 install_directory_(install_directory), |
594 extensions_enabled_(extensions_enabled), | 594 extensions_enabled_(extensions_enabled), |
595 show_extensions_prompts_(true), | 595 show_extensions_prompts_(true), |
596 ready_(false), | 596 ready_(false), |
597 toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 597 toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
598 permissions_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 598 permissions_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
599 apps_promo_(profile->GetPrefs()), | 599 apps_promo_(profile->GetPrefs()), |
600 event_routers_initialized_(false) { | 600 event_routers_initialized_(false) { |
601 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 601 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 } | 1657 } |
1658 | 1658 |
1659 Profile* ExtensionService::profile() { | 1659 Profile* ExtensionService::profile() { |
1660 return profile_; | 1660 return profile_; |
1661 } | 1661 } |
1662 | 1662 |
1663 ExtensionPrefs* ExtensionService::extension_prefs() { | 1663 ExtensionPrefs* ExtensionService::extension_prefs() { |
1664 return extension_prefs_; | 1664 return extension_prefs_; |
1665 } | 1665 } |
1666 | 1666 |
1667 ExtensionSettings* ExtensionService::extension_settings() { | 1667 ExtensionSettingsUIWrapper* ExtensionService::extension_settings() { |
1668 return extension_settings_; | 1668 return &extension_settings_; |
1669 } | 1669 } |
1670 | 1670 |
1671 ExtensionContentSettingsStore* | 1671 ExtensionContentSettingsStore* |
1672 ExtensionService::GetExtensionContentSettingsStore() { | 1672 ExtensionService::GetExtensionContentSettingsStore() { |
1673 return extension_prefs()->content_settings_store(); | 1673 return extension_prefs()->content_settings_store(); |
1674 } | 1674 } |
1675 | 1675 |
1676 ExtensionUpdater* ExtensionService::updater() { | 1676 ExtensionUpdater* ExtensionService::updater() { |
1677 return updater_.get(); | 1677 return updater_.get(); |
1678 } | 1678 } |
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2892 | 2892 |
2893 ExtensionService::NaClModuleInfoList::iterator | 2893 ExtensionService::NaClModuleInfoList::iterator |
2894 ExtensionService::FindNaClModule(const GURL& url) { | 2894 ExtensionService::FindNaClModule(const GURL& url) { |
2895 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2895 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
2896 iter != nacl_module_list_.end(); ++iter) { | 2896 iter != nacl_module_list_.end(); ++iter) { |
2897 if (iter->url == url) | 2897 if (iter->url == url) |
2898 return iter; | 2898 return iter; |
2899 } | 2899 } |
2900 return nacl_module_list_.end(); | 2900 return nacl_module_list_.end(); |
2901 } | 2901 } |
OLD | NEW |