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

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

Issue 2794263002: Remove ScopedVector from chrome/installer/ (Closed)
Patch Set: #include <utility> Created 3 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
« no previous file with comments | « no previous file | chrome/installer/util/scoped_user_protocol_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory>
9 #include <vector>
10
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h"
10 12
11 class RegistryEntry; 13 class RegistryEntry;
12 14
13 // Windows 8 shows the "No apps are installed to open this type of link" 15 // Windows 8 shows the "No apps are installed to open this type of link"
14 // dialog when choosing a default handler for a |protocol| under certain 16 // dialog when choosing a default handler for a |protocol| under certain
15 // circumstances. Under these circumstances, it appears that ensuring the 17 // circumstances. Under these circumstances, it appears that ensuring the
16 // existance of the HKCU\Software\Classes\<protocol> key with an empty "URL 18 // existance of the HKCU\Software\Classes\<protocol> key with an empty "URL
17 // Protocol" value is sufficient to make the dialog contain the usual list of 19 // Protocol" value is sufficient to make the dialog contain the usual list of
18 // registered browsers. This class creates this key and value in its constructor 20 // registered browsers. This class creates this key and value in its constructor
19 // if needed, and cleans them up in its destructor if no other values or subkeys 21 // if needed, and cleans them up in its destructor if no other values or subkeys
20 // were created in the meantime. For details, see https://crbug.com/569151. 22 // were created in the meantime. For details, see https://crbug.com/569151.
21 class ScopedUserProtocolEntry { 23 class ScopedUserProtocolEntry {
22 public: 24 public:
23 explicit ScopedUserProtocolEntry(const wchar_t* protocol); 25 explicit ScopedUserProtocolEntry(const wchar_t* protocol);
24 ~ScopedUserProtocolEntry(); 26 ~ScopedUserProtocolEntry();
25 27
26 private: 28 private:
27 ScopedVector<RegistryEntry> entries_; 29 std::vector<std::unique_ptr<RegistryEntry>> entries_;
28 30
29 DISALLOW_COPY_AND_ASSIGN(ScopedUserProtocolEntry); 31 DISALLOW_COPY_AND_ASSIGN(ScopedUserProtocolEntry);
30 }; 32 };
31 33
32 #endif // CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_ 34 #endif // CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/scoped_user_protocol_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698