| 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/extensions/extension_management_api.h" | 5 #include "chrome/browser/extensions/extension_management_api.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 505 } |
| 506 CHECK(extension); | 506 CHECK(extension); |
| 507 ExtensionService* service = profile->GetExtensionService(); | 507 ExtensionService* service = profile->GetExtensionService(); |
| 508 ExtensionPrefs* prefs = service->extension_prefs(); | 508 ExtensionPrefs* prefs = service->extension_prefs(); |
| 509 bool enabled = service->GetExtensionById(extension->id(), false) != NULL; | 509 bool enabled = service->GetExtensionById(extension->id(), false) != NULL; |
| 510 bool escalated = prefs ->DidExtensionEscalatePermissions(extension->id()); | 510 bool escalated = prefs ->DidExtensionEscalatePermissions(extension->id()); |
| 511 args.Append(CreateExtensionInfo(*extension, enabled, escalated)); | 511 args.Append(CreateExtensionInfo(*extension, enabled, escalated)); |
| 512 } | 512 } |
| 513 | 513 |
| 514 std::string args_json; | 514 std::string args_json; |
| 515 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json); | 515 base::JSONWriter::Write(&args, &args_json); |
| 516 | 516 |
| 517 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 517 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
| 518 event_name, args_json, NULL, GURL()); | 518 event_name, args_json, NULL, GURL()); |
| 519 } | 519 } |
| OLD | NEW |