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

Unified Diff: ui/base/x/selection_utils.cc

Issue 18308004: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « ui/aura/window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/selection_utils.cc
diff --git a/ui/base/x/selection_utils.cc b/ui/base/x/selection_utils.cc
index 560f494a0c6c1b94c598cb52f1df03d8a74abf68..4696b0047adc6e77566c63879084ce8c4beee8e1 100644
--- a/ui/base/x/selection_utils.cc
+++ b/ui/base/x/selection_utils.cc
@@ -67,7 +67,7 @@ void AddString16ToVector(const string16& str,
std::string RefCountedMemoryToString(
const scoped_refptr<base::RefCountedMemory>& memory) {
- if (!memory) {
+ if (!memory.get()) {
NOTREACHED();
return std::string();
}
@@ -82,7 +82,7 @@ std::string RefCountedMemoryToString(
string16 RefCountedMemoryToString16(
const scoped_refptr<base::RefCountedMemory>& memory) {
- if (!memory) {
+ if (!memory.get()) {
NOTREACHED();
return string16();
}
@@ -168,11 +168,11 @@ bool SelectionData::IsValid() const {
}
const unsigned char* SelectionData::GetData() const {
- return memory_ ? memory_->front() : NULL;
+ return memory_.get() ? memory_->front() : NULL;
}
size_t SelectionData::GetSize() const {
- return memory_ ? memory_->size() : 0;
+ return memory_.get() ? memory_->size() : 0;
}
std::string SelectionData::GetText() const {
« no previous file with comments | « ui/aura/window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698