Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: chrome/browser/extensions/extension_management_api.cc

Issue 9590002: JSONWriter cleanup: integrate pretty print into write options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict 7. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_input_ui_api.cc ('k') | chrome/browser/extensions/extension_menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698