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/ui/webui/extensions/extension_settings_handler.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
6 | 6 |
7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
8 #include "apps/app_restore_service.h" | 8 #include "apps/app_restore_service.h" |
9 #include "apps/app_window.h" | 9 #include "apps/app_window.h" |
10 #include "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 bool is_managed = profile->IsManaged(); | 772 bool is_managed = profile->IsManaged(); |
773 bool developer_mode = | 773 bool developer_mode = |
774 !is_managed && | 774 !is_managed && |
775 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); | 775 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); |
776 results.SetBoolean("profileIsManaged", is_managed); | 776 results.SetBoolean("profileIsManaged", is_managed); |
777 results.SetBoolean("developerMode", developer_mode); | 777 results.SetBoolean("developerMode", developer_mode); |
778 | 778 |
779 // Promote the Chrome Apps & Extensions Developer Tools if they are not | 779 // Promote the Chrome Apps & Extensions Developer Tools if they are not |
780 // installed and the user has not previously dismissed the warning. | 780 // installed and the user has not previously dismissed the warning. |
781 bool promote_apps_dev_tools = false; | 781 bool promote_apps_dev_tools = false; |
782 if (GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV && | 782 if (!ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))-> |
783 !ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))-> | |
784 GetExtensionById(kAppsDeveloperToolsExtensionId, | 783 GetExtensionById(kAppsDeveloperToolsExtensionId, |
785 ExtensionRegistry::EVERYTHING) && | 784 ExtensionRegistry::EVERYTHING) && |
786 !profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDismissedADTPromo)) { | 785 !profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDismissedADTPromo)) { |
787 promote_apps_dev_tools = true; | 786 promote_apps_dev_tools = true; |
788 } | 787 } |
789 results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools); | 788 results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools); |
790 | 789 |
791 bool load_unpacked_disabled = | 790 bool load_unpacked_disabled = |
792 ExtensionPrefs::Get(profile)->ExtensionsBlacklistedByDefault(); | 791 ExtensionPrefs::Get(profile)->ExtensionsBlacklistedByDefault(); |
793 results.SetBoolean("loadUnpackedDisabled", load_unpacked_disabled); | 792 results.SetBoolean("loadUnpackedDisabled", load_unpacked_disabled); |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 extension_service_->EnableExtension(extension_id); | 1283 extension_service_->EnableExtension(extension_id); |
1285 } else { | 1284 } else { |
1286 ExtensionErrorReporter::GetInstance()->ReportError( | 1285 ExtensionErrorReporter::GetInstance()->ReportError( |
1287 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1286 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1288 true); // Be noisy. | 1287 true); // Be noisy. |
1289 } | 1288 } |
1290 requirements_checker_.reset(); | 1289 requirements_checker_.reset(); |
1291 } | 1290 } |
1292 | 1291 |
1293 } // namespace extensions | 1292 } // namespace extensions |
OLD | NEW |