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

Side by Side Diff: chrome/browser/ui/views/certificate_viewer_win.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/certificate_viewer.h" 5 #include "chrome/browser/certificate_viewer.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <cryptuiapi.h> 8 #include <cryptuiapi.h>
9 #pragma comment(lib, "cryptui.lib") 9 #pragma comment(lib, "cryptui.lib")
10 10
(...skipping 27 matching lines...) Expand all
38 view_info.rghStores = &cert_store; 38 view_info.rghStores = &cert_store;
39 BOOL properties_changed; 39 BOOL properties_changed;
40 40
41 // We must allow nested tasks to dispatch so that, e.g. gpu tasks are 41 // We must allow nested tasks to dispatch so that, e.g. gpu tasks are
42 // processed for painting. This allows a second window to continue painting 42 // processed for painting. This allows a second window to continue painting
43 // while the the certificate dialog is open. 43 // while the the certificate dialog is open.
44 base::MessageLoop::ScopedNestableTaskAllower allow( 44 base::MessageLoop::ScopedNestableTaskAllower allow(
45 base::MessageLoop::current()); 45 base::MessageLoop::current());
46 // This next call blocks but keeps processing windows messages, making it 46 // This next call blocks but keeps processing windows messages, making it
47 // modal to the browser window. 47 // modal to the browser window.
48 BOOL rv = ::CryptUIDlgViewCertificate(&view_info, &properties_changed); 48 ::CryptUIDlgViewCertificate(&view_info, &properties_changed);
49 49
50 CertFreeCertificateContext(cert_list); 50 CertFreeCertificateContext(cert_list);
51 } 51 }
52 52
53 } // namespace 53 } // namespace
54 54
55 void ShowCertificateViewer(content::WebContents* web_contents, 55 void ShowCertificateViewer(content::WebContents* web_contents,
56 gfx::NativeWindow parent, 56 gfx::NativeWindow parent,
57 net::X509Certificate* cert) { 57 net::X509Certificate* cert) {
58 if (chrome::GetHostDesktopTypeForNativeWindow(parent) != 58 if (chrome::GetHostDesktopTypeForNativeWindow(parent) !=
59 chrome::HOST_DESKTOP_TYPE_ASH) { 59 chrome::HOST_DESKTOP_TYPE_ASH) {
60 ShowCertificateViewerImpl( 60 ShowCertificateViewerImpl(
61 web_contents, 61 web_contents,
62 parent->GetHost()->GetAcceleratedWidget(), cert); 62 parent->GetHost()->GetAcceleratedWidget(), cert);
63 } else { 63 } else {
64 NOTIMPLEMENTED(); 64 NOTIMPLEMENTED();
65 } 65 }
66 } 66 }
OLDNEW
« no previous file with comments | « chrome/browser/search/suggestions/suggestions_source.cc ('k') | chrome/browser/ui/views/panels/panel_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698