| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file declares methods that are useful for integrating Chrome in | 5 // This file declares methods that are useful for integrating Chrome in |
| 6 // Windows shell. These methods are all static and currently part of | 6 // Windows shell. These methods are all static and currently part of |
| 7 // ShellUtil class. | 7 // ShellUtil class. |
| 8 | 8 |
| 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 10 #define CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| 11 | 11 |
| 12 #include <windows.h> | 12 #include <windows.h> |
| 13 #include <stddef.h> | 13 #include <stddef.h> |
| 14 #include <stdint.h> | 14 #include <stdint.h> |
| 15 | 15 |
| 16 #include <map> | 16 #include <map> |
| 17 #include <memory> |
| 17 #include <set> | 18 #include <set> |
| 18 #include <utility> | 19 #include <utility> |
| 19 #include <vector> | 20 #include <vector> |
| 20 | 21 |
| 21 #include "base/files/file_path.h" | 22 #include "base/files/file_path.h" |
| 22 #include "base/logging.h" | 23 #include "base/logging.h" |
| 23 #include "base/macros.h" | 24 #include "base/macros.h" |
| 24 #include "base/memory/ref_counted.h" | 25 #include "base/memory/ref_counted.h" |
| 25 #include "base/memory/scoped_vector.h" | |
| 26 #include "base/strings/string16.h" | 26 #include "base/strings/string16.h" |
| 27 #include "chrome/installer/util/work_item_list.h" | 27 #include "chrome/installer/util/work_item_list.h" |
| 28 | 28 |
| 29 class BrowserDistribution; | 29 class BrowserDistribution; |
| 30 class RegistryEntry; | 30 class RegistryEntry; |
| 31 | 31 |
| 32 namespace base { | 32 namespace base { |
| 33 class CancellationFlag; | 33 class CancellationFlag; |
| 34 class CommandLine; | 34 class CommandLine; |
| 35 } | 35 } |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 | 626 |
| 627 // Deletes all associations with a particular application in the Windows | 627 // Deletes all associations with a particular application in the Windows |
| 628 // registry, for the current user only. | 628 // registry, for the current user only. |
| 629 // |prog_id| is the ProgId used by Windows for file associations with this | 629 // |prog_id| is the ProgId used by Windows for file associations with this |
| 630 // application, as given to AddFileAssociations. All information associated | 630 // application, as given to AddFileAssociations. All information associated |
| 631 // with this name will be deleted. | 631 // with this name will be deleted. |
| 632 static bool DeleteFileAssociations(const base::string16& prog_id); | 632 static bool DeleteFileAssociations(const base::string16& prog_id); |
| 633 | 633 |
| 634 // This method converts all the RegistryEntries from the given list to | 634 // This method converts all the RegistryEntries from the given list to |
| 635 // Set/CreateRegWorkItems and runs them using WorkItemList. | 635 // Set/CreateRegWorkItems and runs them using WorkItemList. |
| 636 static bool AddRegistryEntries(HKEY root, | 636 static bool AddRegistryEntries( |
| 637 const ScopedVector<RegistryEntry>& entries); | 637 HKEY root, |
| 638 const std::vector<std::unique_ptr<RegistryEntry>>& entries); |
| 638 | 639 |
| 639 private: | 640 private: |
| 640 DISALLOW_COPY_AND_ASSIGN(ShellUtil); | 641 DISALLOW_COPY_AND_ASSIGN(ShellUtil); |
| 641 }; | 642 }; |
| 642 | 643 |
| 643 | 644 |
| 644 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ | 645 #endif // CHROME_INSTALLER_UTIL_SHELL_UTIL_H_ |
| OLD | NEW |