summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 15:50:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 15:50:30 +0000
commit965722ff0e981ac0775648460be766c829a10a2b (patch)
tree7d8cd2362a1f216eb64aca9ffaefa3d0774e58dd /chrome_frame
parent41a95c41d16de968f5d1b02f1ffcccc287147825 (diff)
downloadchromium_src-965722ff0e981ac0775648460be766c829a10a2b.zip
chromium_src-965722ff0e981ac0775648460be766c829a10a2b.tar.gz
chromium_src-965722ff0e981ac0775648460be766c829a10a2b.tar.bz2
Remove scoped_bstr_win, fix all callers to use the new location.
TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3748012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63216 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/bho.cc4
-rw-r--r--chrome_frame/bind_context_info.h13
-rw-r--r--chrome_frame/chrome_active_document.cc12
-rw-r--r--chrome_frame/chrome_frame_activex.cc8
-rw-r--r--chrome_frame/chrome_frame_activex_base.h54
-rw-r--r--chrome_frame/protocol_sink_wrap.cc4
-rw-r--r--chrome_frame/protocol_sink_wrap.h12
-rw-r--r--chrome_frame/test/chrome_frame_ui_test_utils.cc8
-rw-r--r--chrome_frame/test/http_negotiate_unittest.cc11
-rw-r--r--chrome_frame/test/ie_event_sink.cc7
-rw-r--r--chrome_frame/test/mock_ie_event_sink_actions.h1
-rw-r--r--chrome_frame/test/perf/chrome_frame_perftest.cc16
-rw-r--r--chrome_frame/test/ui_test.cc5
-rw-r--r--chrome_frame/utils.cc10
14 files changed, 86 insertions, 79 deletions
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc
index a8e31a7..b6dc10b 100644
--- a/chrome_frame/bho.cc
+++ b/chrome_frame/bho.cc
@@ -9,9 +9,9 @@
#include "base/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/scoped_bstr_win.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/win/scoped_bstr.h"
#include "chrome_tab.h" // NOLINT
#include "chrome_frame/crash_reporting/crash_metrics.h"
#include "chrome_frame/extra_system_apis.h"
@@ -219,7 +219,7 @@ bool DocumentHasEmbeddedItems(IUnknown* browser) {
// via document.write.
// TODO(ananta)
// Revisit this and come up with a better approach.
- ScopedBstr location_url;
+ base::win::ScopedBstr location_url;
embedded_web_browser2->get_LocationURL(location_url.Receive());
std::wstring location_url_string;
diff --git a/chrome_frame/bind_context_info.h b/chrome_frame/bind_context_info.h
index 4b08505..91ff5c3 100644
--- a/chrome_frame/bind_context_info.h
+++ b/chrome_frame/bind_context_info.h
@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_FRAME_BIND_CONTEXT_INFO_
-#define CHROME_FRAME_BIND_CONTEXT_INFO_
+#ifndef CHROME_FRAME_BIND_CONTEXT_INFO_H_
+#define CHROME_FRAME_BIND_CONTEXT_INFO_H_
#include <atlbase.h>
#include <atlcom.h>
-#include "base/scoped_bstr_win.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/protocol_sink_wrap.h"
class __declspec(uuid("71CC3EC7-7E8A-457f-93BC-1090CF31CC18"))
@@ -104,15 +103,15 @@ class __declspec(uuid("00000000-0000-0000-0000-000000000000")) BindContextInfo
HRESULT Initialize(IBindCtx* bind_ctx);
private:
- ScopedComPtr<IStream> cache_;
+ base::win::ScopedComPtr<IStream> cache_;
bool no_cache_;
bool chrome_request_;
bool is_switching_;
std::wstring url_;
- ScopedComPtr<IUnknown> ftm_;
+ base::win::ScopedComPtr<IUnknown> ftm_;
scoped_refptr<ProtData> prot_data_;
DISALLOW_COPY_AND_ASSIGN(BindContextInfo);
};
-#endif // CHROME_FRAME_BIND_CONTEXT_INFO_
+#endif // CHROME_FRAME_BIND_CONTEXT_INFO_H_
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index 3c19071..d41b1fa 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -22,13 +22,13 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/scoped_variant_win.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "base/thread_local.h"
#include "base/trace_event.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_variant.h"
#include "grit/generated_resources.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -394,7 +394,7 @@ STDMETHODIMP ChromeActiveDocument::LoadHistory(IStream* stream,
stream->Stat(&statstg, STATFLAG_NONAME);
DWORD url_size = statstg.cbSize.LowPart - cur_pos.LowPart;
- ScopedBstr url_bstr;
+ base::win::ScopedBstr url_bstr;
DWORD bytes_read = 0;
stream->Read(url_bstr.AllocateBytes(url_size), url_size, &bytes_read);
std::wstring url(url_bstr);
@@ -711,7 +711,7 @@ void ChromeActiveDocument::UpdateNavigationState(
break;
}
- ScopedVariant secure_lock_status(lock_status);
+ base::win::ScopedVariant secure_lock_status(lock_status);
IEExec(&CGID_ShellDocView, INTERNAL_CMDID_SET_SSL_LOCK,
OLECMDEXECOPT_DODEFAULT, secure_lock_status.AsInput(), NULL);
}
@@ -776,7 +776,7 @@ void ChromeActiveDocument::UpdateNavigationState(
// We need to tell IE that we support navigation so that IE will query us
// for IPersistHistory and call GetPositionCookie to save our navigation
// index.
- ScopedVariant html_window(static_cast<IUnknown*>(
+ base::win::ScopedVariant html_window(static_cast<IUnknown*>(
static_cast<IHTMLWindow2*>(this)));
IEExec(&CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0,
html_window.AsInput(), NULL);
@@ -787,7 +787,7 @@ void ChromeActiveDocument::UpdateNavigationState(
// navigations. This will ensure that IE calls GetPositionCookie
// to save the current position cookie in the travel log and then call
// SetPositionCookie when the user hits Back/Forward to come back here.
- ScopedVariant internal_navigation(HLNF_INTERNALJUMP);
+ base::win::ScopedVariant internal_navigation(HLNF_INTERNALJUMP);
IEExec(&CGID_Explorer, INTERNAL_CMDID_FINALIZE_TRAVEL_LOG, 0,
internal_navigation.AsInput(), NULL);
@@ -807,7 +807,7 @@ void ChromeActiveDocument::UpdateNavigationState(
}
if (is_title_changed) {
- ScopedVariant title(new_navigation_info.title.c_str());
+ base::win::ScopedVariant title(new_navigation_info.title.c_str());
IEExec(NULL, OLECMDID_SETTITLE, OLECMDEXECOPT_DONTPROMPTUSER,
title.AsInput(), NULL);
}
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc
index ad405d3..0d7d256 100644
--- a/chrome_frame/chrome_frame_activex.cc
+++ b/chrome_frame/chrome_frame_activex.cc
@@ -380,7 +380,7 @@ STDMETHODIMP ChromeFrameActivex::put_src(BSTR src) {
if (document_url.SchemeIsSecure()) {
GURL source_url(src);
if (!source_url.SchemeIsSecure()) {
- Base::put_src(ScopedBstr(g_activex_insecure_content_error));
+ Base::put_src(base::win::ScopedBstr(g_activex_insecure_content_error));
return E_ACCESSDENIED;
}
}
@@ -408,7 +408,7 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
ScopedComPtr<IHTMLDocument2> document;
GetContainingDocument(document.Receive());
if (document) {
- ScopedBstr url;
+ base::win::ScopedBstr url;
if (SUCCEEDED(document->get_URL(url.Receive())))
WideToUTF8(url, url.Length(), &document_url_);
}
@@ -440,7 +440,7 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
chrome_extra_arguments.assign(extra_arguments_arg,
extra_arguments_arg.Length());
- ScopedBstr automated_functions_arg;
+ base::win::ScopedBstr automated_functions_arg;
service_hr = service->GetExtensionApisToAutomate(
automated_functions_arg.Receive());
if (S_OK == service_hr && automated_functions_arg) {
@@ -666,6 +666,6 @@ HRESULT ChromeFrameActivex::registerBhoIfNeeded() {
}
web_browser2->PutProperty(base::win::ScopedBstr(bho_class_id_as_string),
- ScopedVariant(bho));
+ base::win::ScopedVariant(bho));
return S_OK;
}
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index 5f063c8..4c0879b 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -17,12 +17,12 @@
#include <vector>
#include "base/metrics/histogram.h"
-#include "base/scoped_bstr_win.h"
-#include "base/scoped_comptr_win.h"
-#include "base/scoped_variant_win.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_bstr.h"
+#include "base/win/scoped_comptr.h"
+#include "base/win/scoped_variant.h"
#include "grit/chrome_frame_resources.h"
#include "chrome/common/url_constants.h"
#include "chrome_frame/chrome_frame_plugin.h"
@@ -38,7 +38,6 @@
// Include without path to make GYP build see it.
#include "chrome_tab.h" // NOLINT
-
// Connection point class to support firing IChromeFrameEvents (dispinterface).
template<class T>
class ATL_NO_VTABLE ProxyDIChromeFrameEvents
@@ -52,7 +51,8 @@ class ATL_NO_VTABLE ProxyDIChromeFrameEvents
// a threading issue, but a re-entrance issue, because the connection
// can be affected by the implementation of the sinks receiving the event.
me->Lock();
- std::vector< ScopedComPtr<IUnknown> > sink_array(m_vec.GetSize());
+ std::vector< base::win::ScopedComPtr<IUnknown> > sink_array(
+ m_vec.GetSize());
for (int connection = 0; connection < m_vec.GetSize(); ++connection)
sink_array[connection] = m_vec.GetAt(connection);
me->Unlock();
@@ -169,7 +169,7 @@ class ATL_NO_VTABLE ChromeFrameActivexBase : // NOLINT
public CComControl<T>,
public ChromeFramePlugin<T> {
protected:
- typedef std::set<ScopedComPtr<IDispatch> > EventHandlers;
+ typedef std::set<base::win::ScopedComPtr<IDispatch> > EventHandlers;
typedef ChromeFrameActivexBase<T, class_id> BasePlugin;
public:
@@ -432,10 +432,10 @@ END_MSG_MAP()
void OnMessageFromChromeFrame(int tab_handle, const std::string& message,
const std::string& origin,
const std::string& target) {
- ScopedComPtr<IDispatch> message_event;
+ base::win::ScopedComPtr<IDispatch> message_event;
if (SUCCEEDED(CreateDomEvent("message", message, origin,
message_event.Receive()))) {
- ScopedVariant event_var;
+ base::win::ScopedVariant event_var;
event_var.Set(static_cast<IDispatch*>(message_event));
InvokeScriptFunction(onmessage_handler_, event_var.AsInput());
}
@@ -446,7 +446,7 @@ END_MSG_MAP()
HWND parent = ::GetParent(m_hWnd);
::SetFocus(parent);
- ScopedComPtr<IOleControlSite> control_site;
+ base::win::ScopedComPtr<IOleControlSite> control_site;
control_site.QueryFrom(m_spClientSite);
if (control_site)
control_site->OnFocus(FALSE);
@@ -464,9 +464,11 @@ END_MSG_MAP()
// There's room for improvement here and also see todo below.
LPARAM OnDownloadRequestInHost(UINT message, WPARAM wparam, LPARAM lparam,
BOOL& handled) {
- ScopedComPtr<IMoniker> moniker(reinterpret_cast<IMoniker*>(lparam));
+ base::win::ScopedComPtr<IMoniker> moniker(
+ reinterpret_cast<IMoniker*>(lparam));
DCHECK(moniker);
- ScopedComPtr<IBindCtx> bind_context(reinterpret_cast<IBindCtx*>(wparam));
+ base::win::ScopedComPtr<IBindCtx> bind_context(
+ reinterpret_cast<IBindCtx*>(wparam));
// TODO(tommi): It looks like we might have to switch the request object
// into a pass-through request object and serve up any thus far received
@@ -772,7 +774,7 @@ END_MSG_MAP()
DCHECK(handlers != NULL);
- handlers->insert(ScopedComPtr<IDispatch>(listener));
+ handlers->insert(base::win::ScopedComPtr<IDispatch>(listener));
return hr;
}
@@ -943,7 +945,7 @@ END_MSG_MAP()
if (SUCCEEDED(hr)) {
ev->AddRef();
- ScopedComPtr<IOleContainer> container;
+ base::win::ScopedComPtr<IOleContainer> container;
m_spClientSite->GetContainer(container.Receive());
if (ev->Initialize(container, data, origin, event_type)) {
*event = ev;
@@ -960,7 +962,7 @@ END_MSG_MAP()
// Helper function to execute a function on a script IDispatch interface.
HRESULT InvokeScriptFunction(const VARIANT& script_object,
const std::string& param) {
- ScopedVariant script_arg(UTF8ToWide(param.c_str()).c_str());
+ base::win::ScopedVariant script_arg(UTF8ToWide(param.c_str()).c_str());
return InvokeScriptFunction(script_object, script_arg.AsInput());
}
@@ -1007,7 +1009,7 @@ END_MSG_MAP()
MSG accel_message = msg;
accel_message.hwnd = ::GetParent(m_hWnd);
HRESULT hr = S_FALSE;
- ScopedComPtr<IBrowserService2> bs2;
+ base::win::ScopedComPtr<IBrowserService2> bs2;
// For non-IE containers, we use the standard IOleInPlaceFrame contract
// (which IE does not support). For IE, we try to use IBrowserService2,
@@ -1017,7 +1019,7 @@ END_MSG_MAP()
// retry, and we fall back to the IBrowserService2 and PostMessage
// approaches below.
if (!in_place_frame_ && !failed_to_fetch_in_place_frame_) {
- ScopedComPtr<IOleInPlaceUIWindow> dummy_ui_window;
+ base::win::ScopedComPtr<IOleInPlaceUIWindow> dummy_ui_window;
RECT dummy_pos_rect = {0};
RECT dummy_clip_rect = {0};
OLEINPLACEFRAMEINFO dummy_frame_info = {0};
@@ -1121,13 +1123,13 @@ END_MSG_MAP()
protected:
void HostNavigate(const GURL& url_to_open,
const GURL& referrer, int open_disposition) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
if (!web_browser2) {
NOTREACHED() << "Failed to retrieve IWebBrowser2 interface";
return;
}
- ScopedVariant url;
+ base::win::ScopedVariant url;
// Check to see if the URL uses a "view-source:" prefix, if so, open it
// using chrome frame full tab mode by using 'cf:' protocol handler.
// Also change the disposition to NEW_WINDOW since IE6 doesn't have tabs.
@@ -1196,8 +1198,8 @@ END_MSG_MAP()
// L"No_Name", uri, L"");
// }
// End of MSHTML-like logic
- VARIANT empty = ScopedVariant::kEmptyVariant;
- ScopedVariant http_headers;
+ VARIANT empty = base::win::ScopedVariant::kEmptyVariant;
+ base::win::ScopedVariant http_headers;
if (referrer.is_valid()) {
std::wstring referrer_header = L"Referer: ";
@@ -1222,15 +1224,15 @@ END_MSG_MAP()
automation_client_->set_use_chrome_network(chrome_network);
}
- ScopedBstr url_;
- ScopedComPtr<IOleDocumentSite> doc_site_;
+ base::win::ScopedBstr url_;
+ base::win::ScopedComPtr<IOleDocumentSite> doc_site_;
// If false, we tried but failed to fetch an IOleInPlaceFrame from our host.
// Cached here so we don't try to fetch it every time if we keep failing.
bool failed_to_fetch_in_place_frame_;
bool draw_sad_tab_;
- ScopedComPtr<IOleInPlaceFrame> in_place_frame_;
+ base::win::ScopedComPtr<IOleInPlaceFrame> in_place_frame_;
// For more information on the ready_state_ property see:
// http://msdn.microsoft.com/en-us/library/aa768179(VS.85).aspx#
@@ -1238,9 +1240,9 @@ END_MSG_MAP()
// The following members contain IDispatch interfaces representing the
// onload/onerror/onmessage handlers on the page.
- ScopedVariant onload_handler_;
- ScopedVariant onerror_handler_;
- ScopedVariant onmessage_handler_;
+ base::win::ScopedVariant onload_handler_;
+ base::win::ScopedVariant onerror_handler_;
+ base::win::ScopedVariant onmessage_handler_;
EventHandlers onmessage_;
EventHandlers onloaderror_;
diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc
index 5d9d42f..7e3a760 100644
--- a/chrome_frame/protocol_sink_wrap.cc
+++ b/chrome_frame/protocol_sink_wrap.cc
@@ -8,11 +8,11 @@
#include "chrome_frame/protocol_sink_wrap.h"
#include "base/logging.h"
-#include "base/scoped_bstr_win.h"
#include "base/singleton.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_bstr.h"
#include "chrome_frame/bho.h"
#include "chrome_frame/bind_context_info.h"
#include "chrome_frame/exception_barrier.h"
@@ -748,7 +748,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex,
if (!uri || !prot_sink || !bind_info)
return E_INVALIDARG;
- ScopedBstr url;
+ base::win::ScopedBstr url;
uri->GetPropertyBSTR(Uri_PROPERTY_ABSOLUTE_URI, url.Receive(), 0);
DLOG_IF(INFO, url != NULL) << "OnStartEx: " << url << PiFlags2Str(flags);
diff --git a/chrome_frame/protocol_sink_wrap.h b/chrome_frame/protocol_sink_wrap.h
index 17f06bc..0d837a0aa 100644
--- a/chrome_frame/protocol_sink_wrap.h
+++ b/chrome_frame/protocol_sink_wrap.h
@@ -15,8 +15,8 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
-#include "base/scoped_comptr_win.h"
-#include "base/scoped_bstr_win.h"
+#include "base/win/scoped_comptr.h"
+#include "base/win/scoped_bstr.h"
#include "googleurl/src/gurl.h"
#include "chrome_frame/chrome_frame_delegate.h"
#include "chrome_frame/http_negotiate.h"
@@ -68,7 +68,7 @@ BEGIN_COM_MAP(ProtocolSinkWrap)
COM_INTERFACE_BLIND_DELEGATE()
END_COM_MAP()
- static ScopedComPtr<IInternetProtocolSink> CreateNewSink(
+ static base::win::ScopedComPtr<IInternetProtocolSink> CreateNewSink(
IInternetProtocolSink* sink, ProtData* prot_data);
// Apparently this has to be public, to satisfy COM_INTERFACE_BLIND_DELEGATE
@@ -95,8 +95,8 @@ END_COM_MAP()
HRESULT ObtainServiceProvider();
// Remember original sink
- ScopedComPtr<IInternetProtocolSink> delegate_;
- ScopedComPtr<IServiceProvider> delegate_service_provider_;
+ base::win::ScopedComPtr<IInternetProtocolSink> delegate_;
+ base::win::ScopedComPtr<IServiceProvider> delegate_service_provider_;
scoped_refptr<ProtData> prot_data_;
DISALLOW_COPY_AND_ASSIGN(ProtocolSinkWrap);
};
@@ -149,7 +149,7 @@ class ProtData : public base::RefCounted<ProtData> {
InternetProtocol_Read_Fn read_fun_;
// What BINDSTATUS_MIMETYPEAVAILABLE and Co. tells us.
- ScopedBstr suggested_mime_type_;
+ base::win::ScopedBstr suggested_mime_type_;
// At least one of the following has been received:
// BINDSTATUS_MIMETYPEAVAILABLE,
// MIMESTATUS_VERIFIEDMIMETYPEAVAILABLE
diff --git a/chrome_frame/test/chrome_frame_ui_test_utils.cc b/chrome_frame/test/chrome_frame_ui_test_utils.cc
index 09bbfbd..8abdf1f 100644
--- a/chrome_frame/test/chrome_frame_ui_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_ui_test_utils.cc
@@ -10,11 +10,11 @@
#include <stack>
#include "base/message_loop.h"
-#include "base/scoped_bstr_win.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_bstr.h"
#include "gfx/point.h"
#include "gfx/rect.h"
#include "chrome_frame/test/win_event_receiver.h"
@@ -146,7 +146,7 @@ bool AccObject::Select() {
}
bool AccObject::SetValue(const std::wstring& value) {
- ScopedBstr value_bstr(value.c_str());
+ base::win::ScopedBstr value_bstr(value.c_str());
EXPECT_HRESULT_SUCCEEDED(accessible_->put_accValue(child_id_, value_bstr));
// Double check that the object's value has actually changed. Some objects'
@@ -163,7 +163,7 @@ bool AccObject::SetValue(const std::wstring& value) {
bool AccObject::GetName(std::wstring* name) {
DCHECK(name);
- ScopedBstr name_bstr;
+ base::win::ScopedBstr name_bstr;
HRESULT result = accessible_->get_accName(child_id_, name_bstr.Receive());
if (SUCCEEDED(result))
name->assign(name_bstr, name_bstr.Length());
@@ -198,7 +198,7 @@ bool AccObject::GetRoleText(std::wstring* role_text) {
bool AccObject::GetValue(std::wstring* value) {
DCHECK(value);
- ScopedBstr value_bstr;
+ base::win::ScopedBstr value_bstr;
HRESULT result = accessible_->get_accValue(child_id_, value_bstr.Receive());
if (SUCCEEDED(result))
value->assign(value_bstr, value_bstr.Length());
diff --git a/chrome_frame/test/http_negotiate_unittest.cc b/chrome_frame/test/http_negotiate_unittest.cc
index e34e963..2fef40b 100644
--- a/chrome_frame/test/http_negotiate_unittest.cc
+++ b/chrome_frame/test/http_negotiate_unittest.cc
@@ -5,10 +5,10 @@
#include <atlbase.h>
#include <atlcom.h>
-#include "base/scoped_bstr_win.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_bstr.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/http_negotiate.h"
#include "chrome_frame/html_utils.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
@@ -134,7 +134,8 @@ class TestInternetProtocolSink
HRESULT hr = browser_.CreateInstance(CLSID_InternetExplorer);
CHECK(SUCCEEDED(hr));
if (SUCCEEDED(hr)) {
- browser_->Navigate(ScopedBstr(L"about:blank"), NULL, NULL, NULL, NULL);
+ browser_->Navigate(base::win::ScopedBstr(L"about:blank"),
+ NULL, NULL, NULL, NULL);
}
}
@@ -181,7 +182,7 @@ END_COM_MAP()
protected:
ULONG status_;
std::wstring status_text_;
- ScopedComPtr<IWebBrowser2> browser_;
+ base::win::ScopedComPtr<IWebBrowser2> browser_;
};
TEST_F(HttpNegotiateTest, ReportProgress) {
@@ -254,7 +255,7 @@ TEST_F(HttpNegotiateTest, ReportProgress) {
L"bar" },
};
- ScopedComPtr<IBrowserService> browser;
+ base::win::ScopedComPtr<IBrowserService> browser;
EXPECT_HRESULT_SUCCEEDED(GetBrowserServiceFromProtocolSink(&test_sink,
browser.Receive()));
diff --git a/chrome_frame/test/ie_event_sink.cc b/chrome_frame/test/ie_event_sink.cc
index 50d33b5..a3c7ba0 100644
--- a/chrome_frame/test/ie_event_sink.cc
+++ b/chrome_frame/test/ie_event_sink.cc
@@ -4,15 +4,18 @@
#include "chrome_frame/test/ie_event_sink.h"
-#include "base/scoped_bstr_win.h"
#include "base/scoped_handle.h"
-#include "base/scoped_variant_win.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_bstr.h"
+#include "base/win/scoped_variant.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::win::ScopedBstr;
+using base::win::ScopedVariant;
+
namespace chrome_frame_test {
const int kDefaultWaitForIEToTerminateMs = 10 * 1000;
diff --git a/chrome_frame/test/mock_ie_event_sink_actions.h b/chrome_frame/test/mock_ie_event_sink_actions.h
index 33d55b9..1a360e9 100644
--- a/chrome_frame/test/mock_ie_event_sink_actions.h
+++ b/chrome_frame/test/mock_ie_event_sink_actions.h
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/platform_thread.h"
-#include "base/scoped_bstr_win.h"
#include "base/time.h"
#include "chrome/common/chrome_switches.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc
index 08dbdf2..e026d48 100644
--- a/chrome_frame/test/perf/chrome_frame_perftest.cc
+++ b/chrome_frame/test/perf/chrome_frame_perftest.cc
@@ -18,15 +18,15 @@
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/scoped_ptr.h"
-#include "base/scoped_bstr_win.h"
-#include "base/scoped_comptr_win.h"
-#include "base/scoped_variant_win.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/time.h"
#include "base/trace_event_win.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
+#include "base/win/scoped_bstr.h"
+#include "base/win/scoped_comptr.h"
+#include "base/win/scoped_variant.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -173,7 +173,7 @@ class ChromeFrameActiveXContainer
void Navigate(const char* url) {
BeforeNavigateImpl(url);
- HRESULT hr = tab_->put_src(ScopedBstr(UTF8ToWide(url).c_str()));
+ HRESULT hr = tab_->put_src(base::win::ScopedBstr(UTF8ToWide(url).c_str()));
DCHECK(hr == S_OK) << "Chrome frame NavigateToURL(" << url
<< base::StringPrintf(L") failed 0x%08X", hr);
}
@@ -183,9 +183,9 @@ class ChromeFrameActiveXContainer
&prop_notify_cookie_);
DCHECK(hr == S_OK) << "AtlAdvice for IPropertyNotifySink failed " << hr;
- ScopedVariant onmessage(onmsg_.ToDispatch());
- ScopedVariant onloaderror(onloaderror_.ToDispatch());
- ScopedVariant onload(onload_.ToDispatch());
+ base::win::ScopedVariant onmessage(onmsg_.ToDispatch());
+ base::win::ScopedVariant onloaderror(onloaderror_.ToDispatch());
+ base::win::ScopedVariant onload(onload_.ToDispatch());
EXPECT_HRESULT_SUCCEEDED(tab_->put_onmessage(onmessage));
EXPECT_HRESULT_SUCCEEDED(tab_->put_onloaderror(onloaderror));
EXPECT_HRESULT_SUCCEEDED(tab_->put_onload(onload));
@@ -209,7 +209,7 @@ class ChromeFrameActiveXContainer
virtual void BeforeNavigateImpl(const char* url) {}
CAxWindow chromeview_;
- ScopedComPtr<IChromeFrame> tab_;
+ base::win::ScopedComPtr<IChromeFrame> tab_;
DWORD prop_notify_cookie_;
DispCallback<ChromeFrameActiveXContainer> onmsg_;
DispCallback<ChromeFrameActiveXContainer> onloaderror_;
diff --git a/chrome_frame/test/ui_test.cc b/chrome_frame/test/ui_test.cc
index 28398cd..3c4d78a 100644
--- a/chrome_frame/test/ui_test.cc
+++ b/chrome_frame/test/ui_test.cc
@@ -5,9 +5,10 @@
#include <mshtmcid.h>
#include <string>
-#include "base/scoped_variant_win.h"
#include "base/test/test_file_util.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_bstr.h"
+#include "base/win/scoped_variant.h"
#include "chrome/common/url_constants.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test/chrome_frame_ui_test_utils.h"
@@ -266,7 +267,7 @@ TEST_P(FullTabUITest, ViewSource) {
void NavigateToCurrentUrl(MockIEEventSink* mock) {
IWebBrowser2* browser = mock->event_sink()->web_browser2();
DCHECK(browser);
- ScopedBstr bstr;
+ base::win::ScopedBstr bstr;
HRESULT hr = browser->get_LocationURL(bstr.Receive());
EXPECT_HRESULT_SUCCEEDED(hr);
if (SUCCEEDED(hr)) {
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index 6af8560..a959adf 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -16,9 +16,6 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/scoped_bstr_win.h"
-#include "base/scoped_comptr_win.h"
-#include "base/scoped_variant_win.h"
#include "base/string_number_conversions.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
@@ -26,6 +23,9 @@
#include "base/thread_local.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
+#include "base/win/scoped_bstr.h"
+#include "base/win/scoped_comptr.h"
+#include "base/win/scoped_variant.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/url_constants.h"
#include "chrome/installer/util/chrome_frame_distribution.h"
@@ -40,6 +40,8 @@
#include "net/http/http_util.h"
using base::win::RegKey;
+using base::win::ScopedComPtr;
+using base::win::ScopedVariant;
// Note that these values are all lower case and are compared to
// lower-case-transformed values.
@@ -462,7 +464,7 @@ FilePath GetIETemporaryFilesFolder() {
SHGDN_NORMAL | SHGDN_FORPARSING,
&path);
DCHECK(SUCCEEDED(hr));
- ScopedBstr temp_internet_files_bstr;
+ base::win::ScopedBstr temp_internet_files_bstr;
StrRetToBSTR(&path, relative_pidl, temp_internet_files_bstr.Receive());
FilePath temp_internet_files(static_cast<BSTR>(temp_internet_files_bstr));
ILFree(tif_pidl);