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

Side by Side Diff: content/browser/download/download_types.h

Issue 7967013: Revert "Fix more symbol exports and a compile failure for the component build of" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/linked_ptr.h" 12 #include "base/memory/linked_ptr.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "content/common/content_export.h"
15 #include "net/base/file_stream.h" 14 #include "net/base/file_stream.h"
16 15
17 namespace net { 16 namespace net {
18 class IOBuffer; 17 class IOBuffer;
19 } 18 }
20 19
21 // DownloadBuffer is created and populated on the IO thread, and passed to the 20 // DownloadBuffer is created and populated on the IO thread, and passed to the
22 // file thread for writing. In order to avoid flooding the file thread with too 21 // file thread for writing. In order to avoid flooding the file thread with too
23 // many small write messages, each write is appended to the DownloadBuffer while 22 // many small write messages, each write is appended to the DownloadBuffer while
24 // waiting for the task to run on the file thread. Access to the write buffers 23 // waiting for the task to run on the file thread. Access to the write buffers
25 // is synchronized via the lock. Each entry in 'contents' represents one data 24 // is synchronized via the lock. Each entry in 'contents' represents one data
26 // buffer and its size in bytes. 25 // buffer and its size in bytes.
27 struct DownloadBuffer { 26 struct DownloadBuffer {
28 DownloadBuffer(); 27 DownloadBuffer();
29 ~DownloadBuffer(); 28 ~DownloadBuffer();
30 29
31 base::Lock lock; 30 base::Lock lock;
32 typedef std::pair<net::IOBuffer*, int> Contents; 31 typedef std::pair<net::IOBuffer*, int> Contents;
33 std::vector<Contents> contents; 32 std::vector<Contents> contents;
34 }; 33 };
35 34
36 // Holds the information about how to save a download file. 35 // Holds the information about how to save a download file.
37 struct CONTENT_EXPORT DownloadSaveInfo { 36 struct DownloadSaveInfo {
38 DownloadSaveInfo(); 37 DownloadSaveInfo();
39 DownloadSaveInfo(const DownloadSaveInfo& info); 38 DownloadSaveInfo(const DownloadSaveInfo& info);
40 ~DownloadSaveInfo(); 39 ~DownloadSaveInfo();
41 DownloadSaveInfo& operator=(const DownloadSaveInfo& info); 40 DownloadSaveInfo& operator=(const DownloadSaveInfo& info);
42 41
43 FilePath file_path; 42 FilePath file_path;
44 linked_ptr<net::FileStream> file_stream; 43 linked_ptr<net::FileStream> file_stream;
45 string16 suggested_name; 44 string16 suggested_name;
46 }; 45 };
47 46
48 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 47 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
OLDNEW
« no previous file with comments | « content/browser/browser_process_sub_thread.h ('k') | content/browser/speech/speech_input_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698