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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after
3698 // Sample json input: { "command": "GetInitialLoadTimes" } 3698 // Sample json input: { "command": "GetInitialLoadTimes" }
3699 // Refer to InitialLoadObserver::GetTimingInformation() for sample output. 3699 // Refer to InitialLoadObserver::GetTimingInformation() for sample output.
3700 void TestingAutomationProvider::GetInitialLoadTimes( 3700 void TestingAutomationProvider::GetInitialLoadTimes(
3701 Browser*, 3701 Browser*,
3702 DictionaryValue*, 3702 DictionaryValue*,
3703 IPC::Message* reply_message) { 3703 IPC::Message* reply_message) {
3704 scoped_ptr<DictionaryValue> return_value( 3704 scoped_ptr<DictionaryValue> return_value(
3705 initial_load_observer_->GetTimingInformation()); 3705 initial_load_observer_->GetTimingInformation());
3706 3706
3707 std::string json_return; 3707 std::string json_return;
3708 base::JSONWriter::Write(return_value.get(), false, &json_return); 3708 base::JSONWriter::Write(return_value.get(), &json_return);
3709 AutomationMsg_SendJSONRequest::WriteReplyParams( 3709 AutomationMsg_SendJSONRequest::WriteReplyParams(
3710 reply_message, json_return, true); 3710 reply_message, json_return, true);
3711 Send(reply_message); 3711 Send(reply_message);
3712 } 3712 }
3713 3713
3714 // Sample json input: { "command": "GetPluginsInfo" } 3714 // Sample json input: { "command": "GetPluginsInfo" }
3715 // Refer chrome/test/pyautolib/plugins_info.py for sample json output. 3715 // Refer chrome/test/pyautolib/plugins_info.py for sample json output.
3716 void TestingAutomationProvider::GetPluginsInfo( 3716 void TestingAutomationProvider::GetPluginsInfo(
3717 Browser* browser, 3717 Browser* browser,
3718 DictionaryValue* args, 3718 DictionaryValue* args,
(...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after
7070 7070
7071 Send(reply_message_); 7071 Send(reply_message_);
7072 redirect_query_ = 0; 7072 redirect_query_ = 0;
7073 reply_message_ = NULL; 7073 reply_message_ = NULL;
7074 } 7074 }
7075 7075
7076 void TestingAutomationProvider::OnRemoveProvider() { 7076 void TestingAutomationProvider::OnRemoveProvider() {
7077 if (g_browser_process) 7077 if (g_browser_process)
7078 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 7078 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
7079 } 7079 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_json.cc ('k') | chrome/browser/bookmarks/bookmark_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698