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

Unified Diff: chrome_frame/urlmon_bind_status_callback.h

Issue 16943003: Rewrite scoped_ptr<T>(NULL) to use the default ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
Index: chrome_frame/urlmon_bind_status_callback.h
diff --git a/chrome_frame/urlmon_bind_status_callback.h b/chrome_frame/urlmon_bind_status_callback.h
index dc310396acc0c7596e5da71e6b55c4228694041a..1bd76a95000ea75a4afb024d3f04cb517720c277 100644
--- a/chrome_frame/urlmon_bind_status_callback.h
+++ b/chrome_frame/urlmon_bind_status_callback.h
@@ -22,7 +22,7 @@ class CacheStream : public CComObjectRoot, public StreamImpl {
COM_INTERFACE_ENTRY(ISequentialStream)
END_COM_MAP()
- CacheStream() : cache_(NULL), size_(0), position_(0), eof_(false) {
+ CacheStream() : size_(0), position_(0), eof_(false) {
}
HRESULT Initialize(const char* cache, size_t size, bool eof);
static HRESULT BSCBFeedData(IBindStatusCallback* bscb, const char* data,
@@ -33,7 +33,7 @@ class CacheStream : public CComObjectRoot, public StreamImpl {
STDMETHOD(Read)(void* pv, ULONG cb, ULONG* read);
protected:
- scoped_ptr<char> cache_;
+ scoped_ptr<char[]> cache_;
size_t size_;
size_t position_;
bool eof_;
@@ -126,8 +126,7 @@ END_COM_MAP()
const wchar_t* status_text)
: progress_(progress),
progress_max_(progress_max),
- status_code_(status_code),
- status_text_(NULL) {
+ status_code_(status_code) {
if (status_text) {
int len = lstrlenW(status_text) + 1;
status_text_.reset(new wchar_t[len]);
@@ -165,7 +164,7 @@ END_COM_MAP()
// We don't use std::wstring here since we want to be able to play
// progress notifications back exactly as we got them. NULL and L"" are
// not equal.
- scoped_ptr<wchar_t> status_text_;
+ scoped_ptr<wchar_t[]> status_text_;
};
typedef std::vector<Progress*> ProgressVector;

Powered by Google App Engine
This is Rietveld 408576698