| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/error_console/error_console.h" | 5 #include "chrome/browser/extensions/error_console/error_console.h" | 
| 6 | 6 | 
| 7 #include <list> | 7 #include <list> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 203 void ErrorConsole::Disable() { | 203 void ErrorConsole::Disable() { | 
| 204   notification_registrar_.RemoveAll(); | 204   notification_registrar_.RemoveAll(); | 
| 205   errors_.RemoveAllErrors(); | 205   errors_.RemoveAllErrors(); | 
| 206   enabled_ = false; | 206   enabled_ = false; | 
| 207 } | 207 } | 
| 208 | 208 | 
| 209 void ErrorConsole::OnPrefChanged() { | 209 void ErrorConsole::OnPrefChanged() { | 
| 210   CheckEnabled(); | 210   CheckEnabled(); | 
| 211 } | 211 } | 
| 212 | 212 | 
| 213 void ErrorConsole::OnExtensionUnloaded(const Extension* extension) { | 213 void ErrorConsole::OnExtensionUnloaded(content::BrowserContext* browser_context, | 
|  | 214                                        const Extension* extension) { | 
| 214   CheckEnabled(); | 215   CheckEnabled(); | 
| 215 } | 216 } | 
| 216 | 217 | 
| 217 void ErrorConsole::OnExtensionLoaded(const Extension* extension) { | 218 void ErrorConsole::OnExtensionLoaded(content::BrowserContext* browser_context, | 
|  | 219                                      const Extension* extension) { | 
| 218   CheckEnabled(); | 220   CheckEnabled(); | 
| 219 } | 221 } | 
| 220 | 222 | 
| 221 void ErrorConsole::AddManifestErrorsForExtension(const Extension* extension) { | 223 void ErrorConsole::AddManifestErrorsForExtension(const Extension* extension) { | 
| 222   const std::vector<InstallWarning>& warnings = | 224   const std::vector<InstallWarning>& warnings = | 
| 223       extension->install_warnings(); | 225       extension->install_warnings(); | 
| 224   for (std::vector<InstallWarning>::const_iterator iter = warnings.begin(); | 226   for (std::vector<InstallWarning>::const_iterator iter = warnings.begin(); | 
| 225        iter != warnings.end(); ++iter) { | 227        iter != warnings.end(); ++iter) { | 
| 226     ReportError(scoped_ptr<ExtensionError>(new ManifestError( | 228     ReportError(scoped_ptr<ExtensionError>(new ManifestError( | 
| 227         extension->id(), | 229         extension->id(), | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 261 | 263 | 
| 262       AddManifestErrorsForExtension(info->extension); | 264       AddManifestErrorsForExtension(info->extension); | 
| 263       break; | 265       break; | 
| 264     } | 266     } | 
| 265     default: | 267     default: | 
| 266       NOTREACHED(); | 268       NOTREACHED(); | 
| 267   } | 269   } | 
| 268 } | 270 } | 
| 269 | 271 | 
| 270 }  // namespace extensions | 272 }  // namespace extensions | 
| OLD | NEW | 
|---|