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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/file_downloader.h

Issue 10830021: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « courgette/patcher_x86_32.h ('k') | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_DOWNLOADER_H_ 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_DOWNLOADER_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_DOWNLOADER_H_ 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_DOWNLOADER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "native_client/src/include/nacl_macros.h" 10 #include "native_client/src/include/nacl_macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class FileDownloader { 42 class FileDownloader {
43 public: 43 public:
44 // Ctor initializes |instance_| to NULL, be sure to call Initialize() before 44 // Ctor initializes |instance_| to NULL, be sure to call Initialize() before
45 // calling Open(), or Open() will fail. 45 // calling Open(), or Open() will fail.
46 FileDownloader() 46 FileDownloader()
47 : instance_(NULL), 47 : instance_(NULL),
48 file_open_notify_callback_(pp::BlockUntilComplete()), 48 file_open_notify_callback_(pp::BlockUntilComplete()),
49 file_io_trusted_interface_(NULL), 49 file_io_trusted_interface_(NULL),
50 url_loader_trusted_interface_(NULL), 50 url_loader_trusted_interface_(NULL),
51 open_time_(-1), 51 open_time_(-1),
52 mode_(DOWNLOAD_TO_FILE),
53 url_scheme_(SCHEME_OTHER),
52 data_stream_callback_source_(NULL) {} 54 data_stream_callback_source_(NULL) {}
53 ~FileDownloader() {} 55 ~FileDownloader() {}
54 56
55 // Initialize() can only be called once during the lifetime of this instance. 57 // Initialize() can only be called once during the lifetime of this instance.
56 void Initialize(Plugin* instance); 58 void Initialize(Plugin* instance);
57 59
58 // Issues a GET on |url| downloading the response into a file. The file is 60 // Issues a GET on |url| downloading the response into a file. The file is
59 // then opened and a file descriptor is made available. 61 // then opened and a file descriptor is made available.
60 // Returns true when callback is scheduled to be called on success or failure. 62 // Returns true when callback is scheduled to be called on success or failure.
61 // Returns false if callback is NULL, Initialize() has not been called or if 63 // Returns false if callback is NULL, Initialize() has not been called or if
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 int64_t open_time_; 139 int64_t open_time_;
138 DownloadMode mode_; 140 DownloadMode mode_;
139 static const uint32_t kTempBufferSize = 2048; 141 static const uint32_t kTempBufferSize = 2048;
140 std::vector<char> temp_buffer_; 142 std::vector<char> temp_buffer_;
141 std::deque<char> buffer_; 143 std::deque<char> buffer_;
142 UrlSchemeType url_scheme_; 144 UrlSchemeType url_scheme_;
143 StreamCallbackSource* data_stream_callback_source_; 145 StreamCallbackSource* data_stream_callback_source_;
144 }; 146 };
145 } // namespace plugin; 147 } // namespace plugin;
146 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_DOWNLOADER_H_ 148 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_FILE_DOWNLOADER_H_
OLDNEW
« no previous file with comments | « courgette/patcher_x86_32.h ('k') | ui/base/dragdrop/os_exchange_data_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698