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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 12302036: Add a mode flag to the tracing framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 7 years, 10 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
« no previous file with comments | « base/test/trace_event_analyzer_unittest.cc ('k') | chrome/test/base/tracing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 return; 763 return;
764 } 764 }
765 765
766 view->Send(new ChromeViewMsg_JavaScriptStressTestControl( 766 view->Send(new ChromeViewMsg_JavaScriptStressTestControl(
767 view->GetRoutingID(), cmd, param)); 767 view->GetRoutingID(), cmd, param));
768 } 768 }
769 769
770 void AutomationProvider::BeginTracing(const std::string& categories, 770 void AutomationProvider::BeginTracing(const std::string& categories,
771 bool* success) { 771 bool* success) {
772 tracing_data_.trace_output.clear(); 772 tracing_data_.trace_output.clear();
773 *success = TraceController::GetInstance()->BeginTracing(this, categories); 773 *success = TraceController::GetInstance()->BeginTracing(
774 this,
775 categories,
776 base::debug::TraceLog::RECORD_UNTIL_FULL);
774 } 777 }
775 778
776 void AutomationProvider::EndTracing(IPC::Message* reply_message) { 779 void AutomationProvider::EndTracing(IPC::Message* reply_message) {
777 bool success = false; 780 bool success = false;
778 if (!tracing_data_.reply_message.get()) 781 if (!tracing_data_.reply_message.get())
779 success = TraceController::GetInstance()->EndTracingAsync(this); 782 success = TraceController::GetInstance()->EndTracingAsync(this);
780 if (success) { 783 if (success) {
781 // Defer EndTracing reply until TraceController calls us back with all the 784 // Defer EndTracing reply until TraceController calls us back with all the
782 // events. 785 // events.
783 tracing_data_.reply_message.reset(reply_message); 786 tracing_data_.reply_message.reset(reply_message);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 825
823 return NULL; 826 return NULL;
824 } 827 }
825 828
826 void AutomationProvider::SaveAsAsync(int tab_handle) { 829 void AutomationProvider::SaveAsAsync(int tab_handle) {
827 NavigationController* tab = NULL; 830 NavigationController* tab = NULL;
828 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 831 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
829 if (web_contents) 832 if (web_contents)
830 web_contents->OnSavePage(); 833 web_contents->OnSavePage();
831 } 834 }
OLDNEW
« no previous file with comments | « base/test/trace_event_analyzer_unittest.cc ('k') | chrome/test/base/tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698