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

Unified Diff: chrome_frame/urlmon_bind_status_callback.cc

Issue 2118001: Not using std::wstring to store progress status text because mshtml is sensit... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 7 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 | « chrome_frame/urlmon_bind_status_callback.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/urlmon_bind_status_callback.cc
===================================================================
--- chrome_frame/urlmon_bind_status_callback.cc (revision 47191)
+++ chrome_frame/urlmon_bind_status_callback.cc (working copy)
@@ -204,6 +204,16 @@
/////////////////////////////////////////////////////////////////////
+BSCBStorageBind::BSCBStorageBind() : clip_format_(CF_NULL) {
+}
+
+BSCBStorageBind::~BSCBStorageBind() {
+ for (std::vector<Progress*>::iterator i = saved_progress_.begin();
+ i != saved_progress_.end(); i++) {
+ delete (*i);
+ }
+}
+
HRESULT BSCBStorageBind::Initialize(IMoniker* moniker, IBindCtx* bind_ctx) {
DLOG(INFO) << __FUNCTION__ << me() << StringPrintf(" tid=%i",
PlatformThread::CurrentId());
@@ -250,9 +260,8 @@
}
if (ShouldCacheProgress(status_code)) {
- Progress new_progress = { progress, progress_max, status_code,
- status_text ? status_text : std::wstring() };
- saved_progress_.push_back(new_progress);
+ saved_progress_.push_back(new Progress(progress, progress_max, status_code,
+ status_text));
} else {
hr = CallbackImpl::OnProgress(progress, progress_max, status_code,
status_text);
@@ -347,12 +356,12 @@
clip_format_ = kMagicClipFormat;
} else {
if (!saved_progress_.empty()) {
- for (std::vector<Progress>::iterator i = saved_progress_.begin();
- i != saved_progress_.end(); i++) {
- const wchar_t* status_text = i->status_text_.empty() ?
- NULL : i->status_text_.c_str();
- CallbackImpl::OnProgress(i->progress_, i->progress_max_,
- i->status_code_, status_text);
+ for (std::vector<Progress*>::iterator i = saved_progress_.begin();
+ i != saved_progress_.end(); i++) {
+ Progress* p = (*i);
+ CallbackImpl::OnProgress(p->progress(), p->progress_max(),
+ p->status_code(), p->status_text());
+ delete p;
}
saved_progress_.clear();
}
« no previous file with comments | « chrome_frame/urlmon_bind_status_callback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698