blob: abd6056476f234c393b54bd97f1019b0a775b67f [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_
#define CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
class RegistryEntry;
// Windows 8 shows the "No apps are installed to open this type of link(http)"
// dialog when choosing default browser under certain circumstances. Under
// these circumstances, it appears that ensuring the existance of the
// HKCU\Software\Classes\http key with an empty "URL Protocol" value is
// sufficient to make the dialog contain the usual list of registered browsers.
// This class creates this key and value in its constructor if needed, and
// cleans them up in its destructor if no other values or subkeys were created
// in the meantime. For details, see https://crbug.com/569151.
class ScopedUserProtocolEntry {
public:
ScopedUserProtocolEntry();
~ScopedUserProtocolEntry();
private:
ScopedVector<RegistryEntry> entries_;
DISALLOW_COPY_AND_ASSIGN(ScopedUserProtocolEntry);
};
#endif // CHROME_INSTALLER_UTIL_SCOPED_USER_PROTOCOL_ENTRY_H_