| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 base::Bind(&ExtensionSettingsHandler::RenderViewHostCreated, | 99 base::Bind(&ExtensionSettingsHandler::RenderViewHostCreated, |
| 100 base::Unretained(this))), | 100 base::Unretained(this))), |
| 101 warning_service_observer_(this) { | 101 warning_service_observer_(this) { |
| 102 } | 102 } |
| 103 | 103 |
| 104 ExtensionSettingsHandler::~ExtensionSettingsHandler() { | 104 ExtensionSettingsHandler::~ExtensionSettingsHandler() { |
| 105 content::RenderViewHost::RemoveCreatedCallback(rvh_created_callback_); | 105 content::RenderViewHost::RemoveCreatedCallback(rvh_created_callback_); |
| 106 | 106 |
| 107 // There may be pending file dialogs, we need to tell them that we've gone | 107 // There may be pending file dialogs, we need to tell them that we've gone |
| 108 // away so they don't try and call back to us. | 108 // away so they don't try and call back to us. |
| 109 if (load_extension_dialog_) | 109 if (load_extension_dialog_.get()) |
| 110 load_extension_dialog_->ListenerDestroyed(); | 110 load_extension_dialog_->ListenerDestroyed(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ExtensionSettingsHandler::ExtensionSettingsHandler(ExtensionService* service, | 113 ExtensionSettingsHandler::ExtensionSettingsHandler(ExtensionService* service, |
| 114 ManagementPolicy* policy) | 114 ManagementPolicy* policy) |
| 115 : extension_service_(service), | 115 : extension_service_(service), |
| 116 management_policy_(policy), | 116 management_policy_(policy), |
| 117 ignore_notifications_(false), | 117 ignore_notifications_(false), |
| 118 deleting_rvh_(NULL), | 118 deleting_rvh_(NULL), |
| 119 registered_for_notifications_(false), | 119 registered_for_notifications_(false), |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 std::vector<std::string> requirement_errors) { | 1035 std::vector<std::string> requirement_errors) { |
| 1036 if (requirement_errors.empty()) { | 1036 if (requirement_errors.empty()) { |
| 1037 extension_service_->EnableExtension(extension_id); | 1037 extension_service_->EnableExtension(extension_id); |
| 1038 } else { | 1038 } else { |
| 1039 ExtensionErrorReporter::GetInstance()->ReportError( | 1039 ExtensionErrorReporter::GetInstance()->ReportError( |
| 1040 UTF8ToUTF16(JoinString(requirement_errors, ' ')), | 1040 UTF8ToUTF16(JoinString(requirement_errors, ' ')), |
| 1041 true /* be noisy */); | 1041 true /* be noisy */); |
| 1042 } | 1042 } |
| 1043 requirements_checker_.reset(); | 1043 requirements_checker_.reset(); |
| 1044 } | 1044 } |
| OLD | NEW |