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

Unified Diff: chrome/browser/autocomplete/autocomplete_accessibility.cc

Issue 200045: Use Scoped[Bstr,ComPtr,Variant] instead of their ATL equivalents to reduce de... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_accessibility.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_accessibility.cc (revision 25862)
+++ chrome/browser/autocomplete/autocomplete_accessibility.cc (working copy)
@@ -99,7 +99,7 @@
if (!temp_name.empty()) {
// Return name retrieved.
- *name = CComBSTR(temp_name.c_str()).Detach();
+ *name = SysAllocString(temp_name.c_str());
} else {
// If no name is found, return S_FALSE.
return S_FALSE;
@@ -127,20 +127,19 @@
std::wstring temp_value;
if (var_id.lVal != CHILDID_SELF)
- return E_INVALIDARG;
+ return E_INVALIDARG;
// Edit box has no children, only handle self.
temp_value = edit_box_->GetText();
if (temp_value.empty())
- return S_FALSE;
+ return S_FALSE;
- // Return value retrieved.
- *value = CComBSTR(temp_value.c_str()).Detach();
+ // Return value retrieved.
+ *value = SysAllocString(temp_value.c_str());
DCHECK(*value);
return S_OK;
-
}
STDMETHODIMP AutocompleteAccessibility::get_accState(VARIANT var_id,

Powered by Google App Engine
This is Rietveld 408576698