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/saved_files_service.h" | 8 #include "apps/saved_files_service.h" |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 bool incognito_available = | 922 bool incognito_available = |
923 IncognitoModePrefs::GetAvailability(profile->GetPrefs()) != | 923 IncognitoModePrefs::GetAvailability(profile->GetPrefs()) != |
924 IncognitoModePrefs::DISABLED; | 924 IncognitoModePrefs::DISABLED; |
925 bool developer_mode = | 925 bool developer_mode = |
926 !is_supervised && | 926 !is_supervised && |
927 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); | 927 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); |
928 results.SetBoolean("profileIsSupervised", is_supervised); | 928 results.SetBoolean("profileIsSupervised", is_supervised); |
929 results.SetBoolean("incognitoAvailable", incognito_available); | 929 results.SetBoolean("incognitoAvailable", incognito_available); |
930 results.SetBoolean("developerMode", developer_mode); | 930 results.SetBoolean("developerMode", developer_mode); |
931 | 931 |
932 results.SetBoolean("enableExtensionInfoDialog", | |
933 ShouldDisplayExtensionInfoDialog()); | |
934 | |
935 // Promote the Chrome Apps & Extensions Developer Tools if they are not | 932 // Promote the Chrome Apps & Extensions Developer Tools if they are not |
936 // installed and the user has not previously dismissed the warning. | 933 // installed and the user has not previously dismissed the warning. |
937 bool promote_apps_dev_tools = false; | 934 bool promote_apps_dev_tools = false; |
938 if (!ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))-> | 935 if (!ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))-> |
939 GetExtensionById(kAppsDeveloperToolsExtensionId, | 936 GetExtensionById(kAppsDeveloperToolsExtensionId, |
940 ExtensionRegistry::EVERYTHING) && | 937 ExtensionRegistry::EVERYTHING) && |
941 !profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDismissedADTPromo)) { | 938 !profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDismissedADTPromo)) { |
942 promote_apps_dev_tools = true; | 939 promote_apps_dev_tools = true; |
943 } | 940 } |
944 results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools); | 941 results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools); |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 extension_service_->EnableExtension(extension_id); | 1510 extension_service_->EnableExtension(extension_id); |
1514 } else { | 1511 } else { |
1515 ExtensionErrorReporter::GetInstance()->ReportError( | 1512 ExtensionErrorReporter::GetInstance()->ReportError( |
1516 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1513 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
1517 true); // Be noisy. | 1514 true); // Be noisy. |
1518 } | 1515 } |
1519 requirements_checker_.reset(); | 1516 requirements_checker_.reset(); |
1520 } | 1517 } |
1521 | 1518 |
1522 } // namespace extensions | 1519 } // namespace extensions |
OLD | NEW |