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

Unified Diff: chrome/browser/chrome_thread_relay.cc

Issue 2878062: Asynchronously open the temp file used for Pepper StreamToFile, and delete th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_thread_relay.h ('k') | chrome/browser/file_system_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_thread_relay.cc
===================================================================
--- chrome/browser/chrome_thread_relay.cc (revision 0)
+++ chrome/browser/chrome_thread_relay.cc (revision 0)
@@ -0,0 +1,26 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chrome_thread_relay.h"
+
+ChromeThreadRelay::ChromeThreadRelay() {
+ if (!ChromeThread::GetCurrentThreadIdentifier(&origin_thread_id_))
+ NOTREACHED() << "Must be created on a valid ChromeThread";
+}
+
+void ChromeThreadRelay::Start(ChromeThread::ID target_thread_id,
+ const tracked_objects::Location& from_here) {
+ ChromeThread::PostTask(
+ target_thread_id,
+ from_here,
+ NewRunnableMethod(this, &ChromeThreadRelay::ProcessOnTargetThread));
+}
+
+void ChromeThreadRelay::ProcessOnTargetThread() {
+ RunWork();
+ ChromeThread::PostTask(
+ origin_thread_id_,
+ FROM_HERE,
+ NewRunnableMethod(this, &ChromeThreadRelay::RunCallback));
+}
Property changes on: chrome\browser\chrome_thread_relay.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/chrome_thread_relay.h ('k') | chrome/browser/file_system_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698