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

Side by Side Diff: chrome/worker/worker_webkitclient_impl.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/worker/worker_webkitclient_impl.h" 5 #include "chrome/worker/worker_webkitclient_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/common/database_util.h" 9 #include "chrome/common/database_util.h"
10 #include "chrome/common/file_system/webfilesystem_impl.h" 10 #include "chrome/common/file_system/webfilesystem_impl.h"
(...skipping 30 matching lines...) Expand all
41 virtual bool getFileSize(const WebKit::WebString& path, long long& result); 41 virtual bool getFileSize(const WebKit::WebString& path, long long& result);
42 virtual bool getFileModificationTime(const WebKit::WebString& path, 42 virtual bool getFileModificationTime(const WebKit::WebString& path,
43 double& result); 43 double& result);
44 }; 44 };
45 45
46 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg) { 46 static bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg) {
47 WorkerThread* worker_thread = WorkerThread::current(); 47 WorkerThread* worker_thread = WorkerThread::current();
48 if (worker_thread) 48 if (worker_thread)
49 return worker_thread->Send(msg); 49 return worker_thread->Send(msg);
50 50
51 scoped_refptr<IPC::SyncMessageFilter> sync_msg_filter = 51 scoped_refptr<IPC::SyncMessageFilter> sync_msg_filter(
52 ChildThread::current()->sync_message_filter(); 52 ChildThread::current()->sync_message_filter());
53 return sync_msg_filter->Send(msg); 53 return sync_msg_filter->Send(msg);
54 } 54 }
55 55
56 bool WorkerWebKitClientImpl::FileUtilities::getFileSize(const WebString& path, 56 bool WorkerWebKitClientImpl::FileUtilities::getFileSize(const WebString& path,
57 long long& result) { 57 long long& result) {
58 if (SendSyncMessageFromAnyThread(new ViewHostMsg_GetFileSize( 58 if (SendSyncMessageFromAnyThread(new ViewHostMsg_GetFileSize(
59 webkit_glue::WebStringToFilePath(path), 59 webkit_glue::WebStringToFilePath(path),
60 reinterpret_cast<int64*>(&result)))) { 60 reinterpret_cast<int64*>(&result)))) {
61 return result >= 0; 61 return result >= 0;
62 } 62 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 new ViewHostMsg_GetPreferredExtensionForMimeType(UTF16ToASCII(mime_type), 249 new ViewHostMsg_GetPreferredExtensionForMimeType(UTF16ToASCII(mime_type),
250 &file_extension)); 250 &file_extension));
251 return webkit_glue::FilePathStringToWebString(file_extension); 251 return webkit_glue::FilePathStringToWebString(file_extension);
252 } 252 }
253 253
254 WebBlobRegistry* WorkerWebKitClientImpl::blobRegistry() { 254 WebBlobRegistry* WorkerWebKitClientImpl::blobRegistry() {
255 if (!blob_registry_.get()) 255 if (!blob_registry_.get())
256 blob_registry_.reset(new WebBlobRegistryImpl(WorkerThread::current())); 256 blob_registry_.reset(new WebBlobRegistryImpl(WorkerThread::current()));
257 return blob_registry_.get(); 257 return blob_registry_.get();
258 } 258 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler.cc ('k') | ipc/file_descriptor_set_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698