Chromium Code Reviews| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 #include "grit/chromium_strings.h" | 61 #include "grit/chromium_strings.h" |
| 62 #include "grit/generated_resources.h" | 62 #include "grit/generated_resources.h" |
| 63 #include "grit/theme_resources.h" | 63 #include "grit/theme_resources.h" |
| 64 #include "ui/base/l10n/l10n_util.h" | 64 #include "ui/base/l10n/l10n_util.h" |
| 65 #include "ui/base/resource/resource_bundle.h" | 65 #include "ui/base/resource/resource_bundle.h" |
| 66 | 66 |
| 67 using content::RenderViewHost; | 67 using content::RenderViewHost; |
| 68 using content::WebContents; | 68 using content::WebContents; |
| 69 using extensions::Extension; | 69 using extensions::Extension; |
| 70 using extensions::ExtensionUpdater; | 70 using extensions::ExtensionUpdater; |
| 71 using extensions::ExtensionWarning; | |
| 71 using extensions::ManagementPolicy; | 72 using extensions::ManagementPolicy; |
| 72 | 73 |
| 73 /////////////////////////////////////////////////////////////////////////////// | 74 /////////////////////////////////////////////////////////////////////////////// |
| 74 // | 75 // |
| 75 // ExtensionSettingsHandler | 76 // ExtensionSettingsHandler |
| 76 // | 77 // |
| 77 /////////////////////////////////////////////////////////////////////////////// | 78 /////////////////////////////////////////////////////////////////////////////// |
| 78 | 79 |
| 79 ExtensionSettingsHandler::ExtensionSettingsHandler() | 80 ExtensionSettingsHandler::ExtensionSettingsHandler() |
| 80 : extension_service_(NULL), | 81 : extension_service_(NULL), |
| 81 management_policy_(NULL), | 82 management_policy_(NULL), |
| 82 ignore_notifications_(false), | 83 ignore_notifications_(false), |
| 83 deleting_rvh_(NULL), | 84 deleting_rvh_(NULL), |
| 84 registered_for_notifications_(false) { | 85 registered_for_notifications_(false) { |
| 85 } | 86 } |
| 86 | 87 |
| 87 ExtensionSettingsHandler::~ExtensionSettingsHandler() { | 88 ExtensionSettingsHandler::~ExtensionSettingsHandler() { |
| 88 // There may be pending file dialogs, we need to tell them that we've gone | 89 // There may be pending file dialogs, we need to tell them that we've gone |
| 89 // away so they don't try and call back to us. | 90 // away so they don't try and call back to us. |
| 90 if (load_extension_dialog_) | 91 if (load_extension_dialog_) |
| 91 load_extension_dialog_->ListenerDestroyed(); | 92 load_extension_dialog_->ListenerDestroyed(); |
| 92 | 93 |
| 93 registrar_.RemoveAll(); | 94 registrar_.RemoveAll(); |
|
Evan Stade
2012/11/13 20:21:54
I don't think this is necessary
battre
2012/11/14 12:30:54
You are right.
Done.
| |
| 95 | |
| 96 if (registered_for_notifications_) { | |
|
Evan Stade
2012/11/13 20:21:54
might be nice if there were a scoped object to han
battre
2012/11/14 12:30:54
Done.
| |
| 97 Profile* profile = Profile::FromWebUI(web_ui()); | |
| 98 extensions::ExtensionWarningService* warning_service = | |
| 99 extensions::ExtensionSystem::Get(profile)->warning_service(); | |
| 100 warning_service->RemoveObserver(this); | |
| 101 } | |
| 94 } | 102 } |
| 95 | 103 |
| 96 ExtensionSettingsHandler::ExtensionSettingsHandler(ExtensionService* service, | 104 ExtensionSettingsHandler::ExtensionSettingsHandler(ExtensionService* service, |
| 97 ManagementPolicy* policy) | 105 ManagementPolicy* policy) |
| 98 : extension_service_(service), | 106 : extension_service_(service), |
| 99 management_policy_(policy), | 107 management_policy_(policy), |
| 100 ignore_notifications_(false), | 108 ignore_notifications_(false), |
| 101 deleting_rvh_(NULL), | 109 deleting_rvh_(NULL), |
| 102 registered_for_notifications_(false) { | 110 registered_for_notifications_(false) { |
| 103 } | 111 } |
| 104 | 112 |
| 105 // static | 113 // static |
| 106 void ExtensionSettingsHandler::RegisterUserPrefs(PrefService* prefs) { | 114 void ExtensionSettingsHandler::RegisterUserPrefs(PrefService* prefs) { |
| 107 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, | 115 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, |
| 108 false, | 116 false, |
| 109 PrefService::SYNCABLE_PREF); | 117 PrefService::SYNCABLE_PREF); |
| 110 } | 118 } |
| 111 | 119 |
| 112 DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( | 120 DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue( |
| 113 const Extension* extension, | 121 const Extension* extension, |
| 114 const std::vector<ExtensionPage>& pages, | 122 const std::vector<ExtensionPage>& pages, |
| 115 const ExtensionWarningSet* warnings_set) { | 123 const extensions::ExtensionWarningService* warning_service) { |
| 116 DictionaryValue* extension_data = new DictionaryValue(); | 124 DictionaryValue* extension_data = new DictionaryValue(); |
| 117 bool enabled = extension_service_->IsExtensionEnabled(extension->id()); | 125 bool enabled = extension_service_->IsExtensionEnabled(extension->id()); |
| 118 extension->GetBasicInfo(enabled, extension_data); | 126 extension->GetBasicInfo(enabled, extension_data); |
| 119 | 127 |
| 120 extension_data->SetBoolean("userModifiable", | 128 extension_data->SetBoolean("userModifiable", |
| 121 management_policy_->UserMayModifySettings(extension, NULL)); | 129 management_policy_->UserMayModifySettings(extension, NULL)); |
| 122 | 130 |
| 123 GURL icon = | 131 GURL icon = |
| 124 ExtensionIconSource::GetIconURL(extension, | 132 ExtensionIconSource::GetIconURL(extension, |
| 125 extension_misc::EXTENSION_ICON_MEDIUM, | 133 extension_misc::EXTENSION_ICON_MEDIUM, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 } | 205 } |
| 198 extension_data->Set("views", views); | 206 extension_data->Set("views", views); |
| 199 extensions::ExtensionActionManager* extension_action_manager = | 207 extensions::ExtensionActionManager* extension_action_manager = |
| 200 extensions::ExtensionActionManager::Get(extension_service_->profile()); | 208 extensions::ExtensionActionManager::Get(extension_service_->profile()); |
| 201 extension_data->SetBoolean( | 209 extension_data->SetBoolean( |
| 202 "hasPopupAction", | 210 "hasPopupAction", |
| 203 extension_action_manager->GetBrowserAction(*extension) || | 211 extension_action_manager->GetBrowserAction(*extension) || |
| 204 extension_action_manager->GetPageAction(*extension)); | 212 extension_action_manager->GetPageAction(*extension)); |
| 205 | 213 |
| 206 // Add warnings. | 214 // Add warnings. |
| 207 if (warnings_set) { | 215 if (warning_service) { |
| 208 std::set<ExtensionWarningSet::WarningType> warnings; | 216 std::vector<std::string> warnings = |
| 209 warnings_set->GetWarningsAffectingExtension(extension->id(), &warnings); | 217 warning_service->GetWarningMessagesForExtension(extension->id()); |
| 210 | 218 |
| 211 if (!warnings.empty()) { | 219 if (!warnings.empty()) { |
| 212 ListValue* warnings_list = new ListValue; | 220 ListValue* warnings_list = new ListValue; |
| 213 for (std::set<ExtensionWarningSet::WarningType>::const_iterator iter = | 221 for (std::vector<std::string>::const_iterator iter = warnings.begin(); |
| 214 warnings.begin(); | 222 iter != warnings.end(); ++iter) { |
| 215 iter != warnings.end(); | 223 warnings_list->Append(Value::CreateStringValue(*iter)); |
| 216 ++iter) { | |
| 217 string16 warning_string( | |
| 218 ExtensionWarningSet::GetLocalizedWarning(*iter)); | |
| 219 warnings_list->Append(Value::CreateStringValue(warning_string)); | |
| 220 } | 224 } |
| 221 extension_data->Set("warnings", warnings_list); | 225 extension_data->Set("warnings", warnings_list); |
| 222 } | 226 } |
| 223 } | 227 } |
| 224 | 228 |
| 225 // Add install warnings (these are not the same as warnings!). | 229 // Add install warnings (these are not the same as warnings!). |
| 226 if (extension->location() == Extension::LOAD) { | 230 if (extension->location() == Extension::LOAD) { |
| 227 const Extension::InstallWarningVector& install_warnings = | 231 const Extension::InstallWarningVector& install_warnings = |
| 228 extension->install_warnings(); | 232 extension->install_warnings(); |
| 229 if (!install_warnings.empty()) { | 233 if (!install_warnings.empty()) { |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED: | 439 case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED: |
| 436 case chrome::NOTIFICATION_EXTENSION_HOST_CREATED: | 440 case chrome::NOTIFICATION_EXTENSION_HOST_CREATED: |
| 437 source_profile = content::Source<Profile>(source).ptr(); | 441 source_profile = content::Source<Profile>(source).ptr(); |
| 438 if (!profile->IsSameProfile(source_profile)) | 442 if (!profile->IsSameProfile(source_profile)) |
| 439 return; | 443 return; |
| 440 MaybeUpdateAfterNotification(); | 444 MaybeUpdateAfterNotification(); |
| 441 break; | 445 break; |
| 442 case chrome::NOTIFICATION_EXTENSION_LOADED: | 446 case chrome::NOTIFICATION_EXTENSION_LOADED: |
| 443 case chrome::NOTIFICATION_EXTENSION_UNLOADED: | 447 case chrome::NOTIFICATION_EXTENSION_UNLOADED: |
| 444 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: | 448 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: |
| 445 case chrome::NOTIFICATION_EXTENSION_WARNING_CHANGED: | |
| 446 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED: | 449 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED: |
| 447 MaybeUpdateAfterNotification(); | 450 MaybeUpdateAfterNotification(); |
| 448 break; | 451 break; |
| 449 default: | 452 default: |
| 450 NOTREACHED(); | 453 NOTREACHED(); |
| 451 } | 454 } |
| 452 } | 455 } |
| 453 | 456 |
| 454 void ExtensionSettingsHandler::OnPreferenceChanged( | 457 void ExtensionSettingsHandler::OnPreferenceChanged( |
| 455 PrefServiceBase* service, | 458 PrefServiceBase* service, |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 482 // There will be no EXTENSION_UNLOADED notification for terminated | 485 // There will be no EXTENSION_UNLOADED notification for terminated |
| 483 // extensions as they were already unloaded. | 486 // extensions as they were already unloaded. |
| 484 if (was_terminated) | 487 if (was_terminated) |
| 485 HandleRequestExtensionsData(NULL); | 488 HandleRequestExtensionsData(NULL); |
| 486 } | 489 } |
| 487 | 490 |
| 488 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { | 491 void ExtensionSettingsHandler::ExtensionUninstallCanceled() { |
| 489 extension_id_prompting_ = ""; | 492 extension_id_prompting_ = ""; |
| 490 } | 493 } |
| 491 | 494 |
| 495 void ExtensionSettingsHandler::ExtensionWarningsChanged() { | |
| 496 MaybeUpdateAfterNotification(); | |
| 497 } | |
| 498 | |
| 492 void ExtensionSettingsHandler::ReloadUnpackedExtensions() { | 499 void ExtensionSettingsHandler::ReloadUnpackedExtensions() { |
| 493 const ExtensionSet* extensions = extension_service_->extensions(); | 500 const ExtensionSet* extensions = extension_service_->extensions(); |
| 494 std::vector<const Extension*> unpacked_extensions; | 501 std::vector<const Extension*> unpacked_extensions; |
| 495 for (ExtensionSet::const_iterator extension = extensions->begin(); | 502 for (ExtensionSet::const_iterator extension = extensions->begin(); |
| 496 extension != extensions->end(); ++extension) { | 503 extension != extensions->end(); ++extension) { |
| 497 if ((*extension)->location() == Extension::LOAD) | 504 if ((*extension)->location() == Extension::LOAD) |
| 498 unpacked_extensions.push_back(*extension); | 505 unpacked_extensions.push_back(*extension); |
| 499 } | 506 } |
| 500 | 507 |
| 501 for (std::vector<const Extension*>::iterator iter = | 508 for (std::vector<const Extension*>::iterator iter = |
| 502 unpacked_extensions.begin(); iter != unpacked_extensions.end(); ++iter) { | 509 unpacked_extensions.begin(); iter != unpacked_extensions.end(); ++iter) { |
| 503 extension_service_->ReloadExtension((*iter)->id()); | 510 extension_service_->ReloadExtension((*iter)->id()); |
| 504 } | 511 } |
| 505 } | 512 } |
| 506 | 513 |
| 507 void ExtensionSettingsHandler::HandleRequestExtensionsData( | 514 void ExtensionSettingsHandler::HandleRequestExtensionsData( |
| 508 const ListValue* args) { | 515 const ListValue* args) { |
| 509 DictionaryValue results; | 516 DictionaryValue results; |
| 510 | 517 |
| 518 Profile* profile = Profile::FromWebUI(web_ui()); | |
| 519 | |
| 511 // Add the extensions to the results structure. | 520 // Add the extensions to the results structure. |
| 512 ListValue *extensions_list = new ListValue(); | 521 ListValue *extensions_list = new ListValue(); |
| 513 | 522 |
| 514 ExtensionWarningSet* warnings = extension_service_->extension_warnings(); | 523 extensions::ExtensionWarningService* warnings = |
| 524 extensions::ExtensionSystem::Get(profile)->warning_service(); | |
| 515 | 525 |
| 516 const ExtensionSet* extensions = extension_service_->extensions(); | 526 const ExtensionSet* extensions = extension_service_->extensions(); |
| 517 for (ExtensionSet::const_iterator extension = extensions->begin(); | 527 for (ExtensionSet::const_iterator extension = extensions->begin(); |
| 518 extension != extensions->end(); ++extension) { | 528 extension != extensions->end(); ++extension) { |
| 519 if ((*extension)->ShouldDisplayInExtensionSettings()) { | 529 if ((*extension)->ShouldDisplayInExtensionSettings()) { |
| 520 extensions_list->Append(CreateExtensionDetailValue( | 530 extensions_list->Append(CreateExtensionDetailValue( |
| 521 *extension, | 531 *extension, |
| 522 GetInspectablePagesForExtension(*extension, true), | 532 GetInspectablePagesForExtension(*extension, true), |
| 523 warnings)); | 533 warnings)); |
| 524 } | 534 } |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 544 warnings)); | 554 warnings)); |
| 545 } | 555 } |
| 546 } | 556 } |
| 547 results.Set("extensions", extensions_list); | 557 results.Set("extensions", extensions_list); |
| 548 | 558 |
| 549 if (ManagedMode::IsInManagedMode()) { | 559 if (ManagedMode::IsInManagedMode()) { |
| 550 results.SetBoolean("managedMode", true); | 560 results.SetBoolean("managedMode", true); |
| 551 results.SetBoolean("developerMode", false); | 561 results.SetBoolean("developerMode", false); |
| 552 } else { | 562 } else { |
| 553 results.SetBoolean("managedMode", false); | 563 results.SetBoolean("managedMode", false); |
| 554 Profile* profile = Profile::FromWebUI(web_ui()); | 564 |
| 555 bool developer_mode = | 565 bool developer_mode = |
| 556 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); | 566 profile->GetPrefs()->GetBoolean(prefs::kExtensionsUIDeveloperMode); |
| 557 results.SetBoolean("developerMode", developer_mode); | 567 results.SetBoolean("developerMode", developer_mode); |
| 558 } | 568 } |
| 559 | 569 |
| 560 // Check to see if we have any wiped out extensions. | 570 // Check to see if we have any wiped out extensions. |
| 561 Profile* profile = Profile::FromWebUI(web_ui()); | |
| 562 ExtensionService* extension_service = | 571 ExtensionService* extension_service = |
| 563 extensions::ExtensionSystem::Get(profile)->extension_service(); | 572 extensions::ExtensionSystem::Get(profile)->extension_service(); |
| 564 scoped_ptr<const ExtensionSet> wiped_out( | 573 scoped_ptr<const ExtensionSet> wiped_out( |
| 565 extension_service->GetWipedOutExtensions()); | 574 extension_service->GetWipedOutExtensions()); |
| 566 results.SetBoolean("showDisabledExtensionsWarning", wiped_out->size() > 0); | 575 results.SetBoolean("showDisabledExtensionsWarning", wiped_out->size() > 0); |
| 567 | 576 |
| 568 bool load_unpacked_disabled = | 577 bool load_unpacked_disabled = |
| 569 extension_service_->extension_prefs()->ExtensionsBlacklistedByDefault(); | 578 extension_service_->extension_prefs()->ExtensionsBlacklistedByDefault(); |
| 570 results.SetBoolean("loadUnpackedDisabled", load_unpacked_disabled); | 579 results.SetBoolean("loadUnpackedDisabled", load_unpacked_disabled); |
| 571 | 580 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 817 registered_for_notifications_ = true; | 826 registered_for_notifications_ = true; |
| 818 Profile* profile = Profile::FromWebUI(web_ui()); | 827 Profile* profile = Profile::FromWebUI(web_ui()); |
| 819 | 828 |
| 820 // Register for notifications that we need to reload the page. | 829 // Register for notifications that we need to reload the page. |
| 821 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 830 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
| 822 content::Source<Profile>(profile)); | 831 content::Source<Profile>(profile)); |
| 823 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 832 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
| 824 content::Source<Profile>(profile)); | 833 content::Source<Profile>(profile)); |
| 825 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, | 834 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, |
| 826 content::Source<Profile>(profile)); | 835 content::Source<Profile>(profile)); |
| 827 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_WARNING_CHANGED, | |
| 828 content::Source<Profile>(profile)); | |
| 829 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED, | 836 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED, |
| 830 content::NotificationService::AllBrowserContextsAndSources()); | 837 content::NotificationService::AllBrowserContextsAndSources()); |
| 831 registrar_.Add(this, | 838 registrar_.Add(this, |
| 832 content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, | 839 content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, |
| 833 content::NotificationService::AllBrowserContextsAndSources()); | 840 content::NotificationService::AllBrowserContextsAndSources()); |
| 834 registrar_.Add(this, | 841 registrar_.Add(this, |
| 835 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, | 842 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, |
| 836 content::NotificationService::AllBrowserContextsAndSources()); | 843 content::NotificationService::AllBrowserContextsAndSources()); |
| 837 registrar_.Add(this, | 844 registrar_.Add(this, |
| 838 chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, | 845 chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED, |
| 839 content::NotificationService::AllBrowserContextsAndSources()); | 846 content::NotificationService::AllBrowserContextsAndSources()); |
| 840 registrar_.Add(this, | 847 registrar_.Add(this, |
| 841 chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED, | 848 chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED, |
| 842 content::NotificationService::AllBrowserContextsAndSources()); | 849 content::NotificationService::AllBrowserContextsAndSources()); |
| 843 registrar_.Add( | 850 registrar_.Add( |
| 844 this, | 851 this, |
| 845 chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED, | 852 chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED, |
| 846 content::Source<extensions::ExtensionPrefs>( | 853 content::Source<extensions::ExtensionPrefs>( |
| 847 profile->GetExtensionService()->extension_prefs())); | 854 profile->GetExtensionService()->extension_prefs())); |
| 848 | 855 |
| 856 extensions::ExtensionWarningService* warning_service = | |
| 857 extensions::ExtensionSystem::Get(profile)->warning_service(); | |
| 858 warning_service->AddObserver(this); | |
| 859 | |
| 849 pref_registrar_.Init(profile->GetPrefs()); | 860 pref_registrar_.Init(profile->GetPrefs()); |
| 850 pref_registrar_.Add(prefs::kExtensionInstallDenyList, this); | 861 pref_registrar_.Add(prefs::kExtensionInstallDenyList, this); |
| 851 local_state_pref_registrar_.Init(g_browser_process->local_state()); | 862 local_state_pref_registrar_.Init(g_browser_process->local_state()); |
| 852 local_state_pref_registrar_.Add(prefs::kInManagedMode, this); | 863 local_state_pref_registrar_.Add(prefs::kInManagedMode, this); |
| 853 } | 864 } |
| 854 | 865 |
| 855 std::vector<ExtensionPage> | 866 std::vector<ExtensionPage> |
| 856 ExtensionSettingsHandler::GetInspectablePagesForExtension( | 867 ExtensionSettingsHandler::GetInspectablePagesForExtension( |
| 857 const Extension* extension, bool extension_is_enabled) { | 868 const Extension* extension, bool extension_is_enabled) { |
| 858 std::vector<ExtensionPage> result; | 869 std::vector<ExtensionPage> result; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 962 std::vector<std::string> requirement_errors) { | 973 std::vector<std::string> requirement_errors) { |
| 963 if (requirement_errors.empty()) { | 974 if (requirement_errors.empty()) { |
| 964 extension_service_->EnableExtension(extension_id); | 975 extension_service_->EnableExtension(extension_id); |
| 965 } else { | 976 } else { |
| 966 ExtensionErrorReporter::GetInstance()->ReportError( | 977 ExtensionErrorReporter::GetInstance()->ReportError( |
| 967 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 978 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 968 true /* be noisy */); | 979 true /* be noisy */); |
| 969 } | 980 } |
| 970 requirements_checker_.reset(); | 981 requirements_checker_.reset(); |
| 971 } | 982 } |
| OLD | NEW |