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

Side by Side Diff: chrome/installer/util/scoped_user_protocol_entry.h

Issue 1896513002: Fix registerProtocolHandler implementation on Windows 8 and 10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang compilation Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_ 5 #ifndef CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_
6 #define CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_ 6 #define CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 10
11 class RegistryEntry; 11 class RegistryEntry;
12 12
13 // Windows 8 shows the "No apps are installed to open this type of link(http)" 13 // Windows 8 shows the "No apps are installed to open this type of link"
14 // dialog when choosing default browser under certain circumstances. Under 14 // dialog when choosing a default handler for a |protocol| under certain
15 // these circumstances, it appears that ensuring the existance of the 15 // circumstances. Under these circumstances, it appears that ensuring the
16 // HKCU\Software\Classes\http key with an empty "URL Protocol" value is 16 // existance of the HKCU\Software\Classes\<protocol> key with an empty "URL
17 // sufficient to make the dialog contain the usual list of registered browsers. 17 // Protocol" value is sufficient to make the dialog contain the usual list of
18 // This class creates this key and value in its constructor if needed, and 18 // registered browsers. This class creates this key and value in its constructor
19 // cleans them up in its destructor if no other values or subkeys were created 19 // if needed, and cleans them up in its destructor if no other values or subkeys
20 // in the meantime. For details, see https://crbug.com/569151. 20 // were created in the meantime. For details, see https://crbug.com/569151.
21 class ScopedUserProtocolEntry { 21 class ScopedUserProtocolEntry {
22 public: 22 public:
23 ScopedUserProtocolEntry(); 23 explicit ScopedUserProtocolEntry(const wchar_t* protocol);
24 ~ScopedUserProtocolEntry(); 24 ~ScopedUserProtocolEntry();
25 25
26 private: 26 private:
27 ScopedVector<RegistryEntry> entries_; 27 ScopedVector<RegistryEntry> entries_;
28 28
29 DISALLOW_COPY_AND_ASSIGN(ScopedUserProtocolEntry); 29 DISALLOW_COPY_AND_ASSIGN(ScopedUserProtocolEntry);
30 }; 30 };
31 31
32 #endif // CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_ 32 #endif // CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/installer/util/scoped_user_protocol_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698