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

Side by Side Diff: ceee/ie/common/chrome_frame_host.cc

Issue 4321007: Verify that we don't receive a NULL pointer for the session_id. This check wi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // ChromeFrameHost implementation. 5 // ChromeFrameHost implementation.
6 #include "ceee/ie/common/chrome_frame_host.h" 6 #include "ceee/ie/common/chrome_frame_host.h"
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return E_UNEXPECTED; 164 return E_UNEXPECTED;
165 } 165 }
166 } 166 }
167 167
168 HRESULT ChromeFrameHost::GetSessionId(int* session_id) { 168 HRESULT ChromeFrameHost::GetSessionId(int* session_id) {
169 if (chrome_frame_) { 169 if (chrome_frame_) {
170 CComQIPtr<IChromeFrameInternal> chrome_frame_internal_(chrome_frame_); 170 CComQIPtr<IChromeFrameInternal> chrome_frame_internal_(chrome_frame_);
171 if (chrome_frame_internal_) { 171 if (chrome_frame_internal_) {
172 return chrome_frame_internal_->getSessionId(session_id); 172 return chrome_frame_internal_->getSessionId(session_id);
173 } else { 173 } else {
174 *session_id = kInvalidChromeSessionId; 174 // This whole else should be removed when getSessionId gets committed to
175 return S_OK; 175 // ChromeFrame.
176 if (session_id != NULL) {
177 *session_id = kInvalidChromeSessionId;
178 return S_OK;
179 }
176 } 180 }
177 } 181 }
178 NOTREACHED(); 182 NOTREACHED();
179 return E_UNEXPECTED; 183 return E_UNEXPECTED;
180 } 184 }
181 185
182 void ChromeFrameHost::OnFinalMessage(HWND window) { 186 void ChromeFrameHost::OnFinalMessage(HWND window) {
183 GetUnknown()->Release(); 187 GetUnknown()->Release();
184 } 188 }
185 189
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 370
367 // Forward to the sink. 371 // Forward to the sink.
368 event_sink_->OnCfPrivateMessage(V_BSTR(&data), V_BSTR(&origin), target); 372 event_sink_->OnCfPrivateMessage(V_BSTR(&data), V_BSTR(&origin), target);
369 } 373 }
370 374
371 STDMETHODIMP_(void) ChromeFrameHost::SetChromeProfileName( 375 STDMETHODIMP_(void) ChromeFrameHost::SetChromeProfileName(
372 const wchar_t* chrome_profile_name) { 376 const wchar_t* chrome_profile_name) {
373 chrome_profile_name_ = chrome_profile_name; 377 chrome_profile_name_ = chrome_profile_name;
374 DLOG(INFO) << "Assigned profile name " << chrome_profile_name_; 378 DLOG(INFO) << "Assigned profile name " << chrome_profile_name_;
375 } 379 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698