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

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

Issue 9333003: Use FILE thread for disk operations in TraceSubscriberStdio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Now using SequencedWorkerPool Created 8 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
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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void AutomationProvider::OnEndTracingComplete() { 390 void AutomationProvider::OnEndTracingComplete() {
391 IPC::Message* reply_message = tracing_data_.reply_message.release(); 391 IPC::Message* reply_message = tracing_data_.reply_message.release();
392 if (reply_message) { 392 if (reply_message) {
393 AutomationMsg_EndTracing::WriteReplyParams( 393 AutomationMsg_EndTracing::WriteReplyParams(
394 reply_message, tracing_data_.trace_output.size(), true); 394 reply_message, tracing_data_.trace_output.size(), true);
395 Send(reply_message); 395 Send(reply_message);
396 } 396 }
397 } 397 }
398 398
399 void AutomationProvider::OnTraceDataCollected( 399 void AutomationProvider::OnTraceDataCollected(
400 const std::string& trace_fragment) { 400 const scoped_refptr<base::RefCountedString>& trace_fragment) {
401 tracing_data_.trace_output.push_back(trace_fragment); 401 tracing_data_.trace_output.push_back(trace_fragment->data());
402 } 402 }
403 403
404 bool AutomationProvider::OnMessageReceived(const IPC::Message& message) { 404 bool AutomationProvider::OnMessageReceived(const IPC::Message& message) {
405 bool handled = true; 405 bool handled = true;
406 bool deserialize_success = true; 406 bool deserialize_success = true;
407 IPC_BEGIN_MESSAGE_MAP_EX(AutomationProvider, message, deserialize_success) 407 IPC_BEGIN_MESSAGE_MAP_EX(AutomationProvider, message, deserialize_success)
408 #if !defined(OS_MACOSX) 408 #if !defined(OS_MACOSX)
409 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WindowDrag, 409 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WindowDrag,
410 WindowSimulateDrag) 410 WindowSimulateDrag)
411 #endif // !defined(OS_MACOSX) 411 #endif // !defined(OS_MACOSX)
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 } 1002 }
1003 } 1003 }
1004 } 1004 }
1005 1005
1006 void AutomationProvider::SaveAsAsync(int tab_handle) { 1006 void AutomationProvider::SaveAsAsync(int tab_handle) {
1007 NavigationController* tab = NULL; 1007 NavigationController* tab = NULL;
1008 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab); 1008 WebContents* web_contents = GetWebContentsForHandle(tab_handle, &tab);
1009 if (web_contents) 1009 if (web_contents)
1010 web_contents->OnSavePage(); 1010 web_contents->OnSavePage();
1011 } 1011 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698