| 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 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 bool incognito_available = | 910 bool incognito_available = |
| 911 IncognitoModePrefs::GetAvailability(profile->GetPrefs()) != | 911 IncognitoModePrefs::GetAvailability(profile->GetPrefs()) != |
| 912 IncognitoModePrefs::DISABLED; | 912 IncognitoModePrefs::DISABLED; |
| 913 bool developer_mode = | 913 bool developer_mode = |
| 914 !is_supervised && | 914 !is_supervised && |
| 915 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); | 915 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); |
| 916 results.SetBoolean("profileIsSupervised", is_supervised); | 916 results.SetBoolean("profileIsSupervised", is_supervised); |
| 917 results.SetBoolean("incognitoAvailable", incognito_available); | 917 results.SetBoolean("incognitoAvailable", incognito_available); |
| 918 results.SetBoolean("developerMode", developer_mode); | 918 results.SetBoolean("developerMode", developer_mode); |
| 919 | 919 |
| 920 results.SetBoolean("enableExtensionInfoDialog", |
| 921 CommandLine::ForCurrentProcess()->HasSwitch( |
| 922 switches::kEnableExtensionInfoDialog)); |
| 923 |
| 920 // Promote the Chrome Apps & Extensions Developer Tools if they are not | 924 // Promote the Chrome Apps & Extensions Developer Tools if they are not |
| 921 // installed and the user has not previously dismissed the warning. | 925 // installed and the user has not previously dismissed the warning. |
| 922 bool promote_apps_dev_tools = false; | 926 bool promote_apps_dev_tools = false; |
| 923 if (!ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))-> | 927 if (!ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))-> |
| 924 GetExtensionById(kAppsDeveloperToolsExtensionId, | 928 GetExtensionById(kAppsDeveloperToolsExtensionId, |
| 925 ExtensionRegistry::EVERYTHING) && | 929 ExtensionRegistry::EVERYTHING) && |
| 926 !profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDismissedADTPromo)) { | 930 !profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDismissedADTPromo)) { |
| 927 promote_apps_dev_tools = true; | 931 promote_apps_dev_tools = true; |
| 928 } | 932 } |
| 929 results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools); | 933 results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools); |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 extension_service_->EnableExtension(extension_id); | 1503 extension_service_->EnableExtension(extension_id); |
| 1500 } else { | 1504 } else { |
| 1501 ExtensionErrorReporter::GetInstance()->ReportError( | 1505 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1502 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1506 base::UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1503 true); // Be noisy. | 1507 true); // Be noisy. |
| 1504 } | 1508 } |
| 1505 requirements_checker_.reset(); | 1509 requirements_checker_.reset(); |
| 1506 } | 1510 } |
| 1507 | 1511 |
| 1508 } // namespace extensions | 1512 } // namespace extensions |
| OLD | NEW |