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

Side by Side Diff: chrome/browser/download/download_extension_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/download/download_extension_api.h" 5 #include "chrome/browser/download/download_extension_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cctype> 8 #include <cctype>
9 #include <iterator> 9 #include <iterator>
10 #include <set> 10 #include <set>
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 DownloadManager* manager) { 1059 DownloadManager* manager) {
1060 manager_->RemoveObserver(this); 1060 manager_->RemoveObserver(this);
1061 manager_ = NULL; 1061 manager_ = NULL;
1062 } 1062 }
1063 1063
1064 void ExtensionDownloadsEventRouter::DispatchEvent( 1064 void ExtensionDownloadsEventRouter::DispatchEvent(
1065 const char* event_name, base::Value* arg) { 1065 const char* event_name, base::Value* arg) {
1066 ListValue args; 1066 ListValue args;
1067 args.Append(arg); 1067 args.Append(arg);
1068 std::string json_args; 1068 std::string json_args;
1069 base::JSONWriter::Write(&args, false, &json_args); 1069 base::JSONWriter::Write(&args, &json_args);
1070 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( 1070 profile_->GetExtensionEventRouter()->DispatchEventToRenderers(
1071 event_name, 1071 event_name,
1072 json_args, 1072 json_args,
1073 profile_, 1073 profile_,
1074 GURL()); 1074 GURL());
1075 } 1075 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | chrome/browser/extensions/api/api_resource_event_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698