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

Unified Diff: chrome_frame/chrome_frame_activex.cc

Issue 4563001: Adding a privileged callback used in IE CF to check whether to show... (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_frame_activex.h ('k') | chrome_frame/chrome_frame_npapi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_frame_activex.cc
===================================================================
--- chrome_frame/chrome_frame_activex.cc (revision 65052)
+++ chrome_frame/chrome_frame_activex.cc (working copy)
@@ -246,13 +246,35 @@
}
}
+bool ChromeFrameActivex::ShouldShowVersionMismatchDialog(
+ bool is_privileged,
+ IOleClientSite* client_site) {
+ if (!is_privileged) {
+ return true;
+ }
+
+ if (client_site) {
+ ScopedComPtr<IChromeFramePrivileged> service;
+ HRESULT hr = DoQueryService(SID_ChromeFramePrivileged,
+ client_site,
+ service.Receive());
+ if (SUCCEEDED(hr) && service) {
+ return (S_FALSE != service->ShouldShowVersionMismatchDialog());
+ }
+ }
+
+ NOTREACHED();
+ return true;
+}
+
void ChromeFrameActivex::OnAutomationServerLaunchFailed(
AutomationLaunchResult reason, const std::string& server_version) {
Base::OnAutomationServerLaunchFailed(reason, server_version);
- // Do not display warnings for privileged instances of Chrome Frame.
- if (reason == AUTOMATION_VERSION_MISMATCH && !is_privileged_) {
- THREAD_SAFE_UMA_HISTOGRAM_COUNTS("ChromeFrame.VersionMismatchDisplayed", 1);
+ if (reason == AUTOMATION_VERSION_MISMATCH &&
+ ShouldShowVersionMismatchDialog(is_privileged_, m_spClientSite)) {
+ THREAD_SAFE_UMA_HISTOGRAM_COUNTS(
+ "ChromeFrame.VersionMismatchDisplayed", 1);
DisplayVersionMismatchWarning(m_hWnd, server_version);
}
}
« no previous file with comments | « chrome_frame/chrome_frame_activex.h ('k') | chrome_frame/chrome_frame_npapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698