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

Side by Side Diff: content/browser/tab_contents/web_drag_source_mac.mm

Issue 9349005: net: Rename FileStream::Open/Close with OpenSync/CloseSync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 #import "content/browser/tab_contents/web_drag_source_mac.h" 5 #import "content/browser/tab_contents/web_drag_source_mac.h"
6 6
7 #include <sys/param.h> 7 #include <sys/param.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // is responsible for opening the file. It takes the drop data and an open file 74 // is responsible for opening the file. It takes the drop data and an open file
75 // stream. 75 // stream.
76 void PromiseWriterHelper(const WebDropData& drop_data, 76 void PromiseWriterHelper(const WebDropData& drop_data,
77 FileStream* file_stream) { 77 FileStream* file_stream) {
78 DCHECK(file_stream); 78 DCHECK(file_stream);
79 file_stream->Write(drop_data.file_contents.data(), 79 file_stream->Write(drop_data.file_contents.data(),
80 drop_data.file_contents.length(), 80 drop_data.file_contents.length(),
81 net::CompletionCallback()); 81 net::CompletionCallback());
82 82
83 if (file_stream) 83 if (file_stream)
84 file_stream->Close(); 84 file_stream->CloseSync();
85 } 85 }
86 86
87 } // namespace 87 } // namespace
88 88
89 89
90 @interface WebDragSource(Private) 90 @interface WebDragSource(Private)
91 91
92 - (void)fillPasteboard; 92 - (void)fillPasteboard;
93 - (NSImage*)dragImage; 93 - (NSImage*)dragImage;
94 94
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 - (NSImage*)dragImage { 441 - (NSImage*)dragImage {
442 if (dragImage_) 442 if (dragImage_)
443 return dragImage_; 443 return dragImage_;
444 444
445 // Default to returning a generic image. 445 // Default to returning a generic image.
446 return gfx::GetCachedImageWithName(@"nav.pdf"); 446 return gfx::GetCachedImageWithName(@"nav.pdf");
447 } 447 }
448 448
449 @end // @implementation WebDragSource (Private) 449 @end // @implementation WebDragSource (Private)
OLDNEW
« no previous file with comments | « content/browser/renderer_host/redirect_to_file_resource_handler.cc ('k') | net/base/file_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698