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

Unified Diff: base/win/scoped_hglobal.h

Issue 380553002: Add a unit test that filenames aren't unintentionally converted to URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 5 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
« no previous file with comments | « no previous file | printing/backend/print_backend_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_hglobal.h
diff --git a/base/win/scoped_hglobal.h b/base/win/scoped_hglobal.h
index 891e6cdfc87b14e8f9bcc77f55dc961928aeeb3a..185ccbd5f0cf017960df480e9f2d5f855f01294b 100644
--- a/base/win/scoped_hglobal.h
+++ b/base/win/scoped_hglobal.h
@@ -17,23 +17,23 @@ template<class T>
class ScopedHGlobal {
public:
explicit ScopedHGlobal(HGLOBAL glob) : glob_(glob) {
- data_ = static_cast<T*>(GlobalLock(glob_));
+ data_ = static_cast<T>(GlobalLock(glob_));
}
~ScopedHGlobal() {
GlobalUnlock(glob_);
}
- T* get() { return data_; }
+ T get() { return data_; }
size_t Size() const { return GlobalSize(glob_); }
- T* operator->() const {
+ T operator->() const {
assert(data_ != 0);
return data_;
}
- T* release() {
- T* data = data_;
+ T release() {
+ T data = data_;
data_ = NULL;
return data;
}
@@ -41,7 +41,7 @@ class ScopedHGlobal {
private:
HGLOBAL glob_;
- T* data_;
+ T data_;
DISALLOW_COPY_AND_ASSIGN(ScopedHGlobal);
};
« no previous file with comments | « no previous file | printing/backend/print_backend_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698