| 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 a class that contains various method related to branding. | 5 // This file declares a class that contains various method related to branding. |
| 6 | 6 |
| 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| 9 | 9 |
| 10 #include <memory> |
| 10 #include <string> | 11 #include <string> |
| 11 | 12 |
| 12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/version.h" | 16 #include "base/version.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "chrome/installer/util/util_constants.h" | 18 #include "chrome/installer/util/util_constants.h" |
| 19 | 19 |
| 20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
| 21 #include <windows.h> // NOLINT | 21 #include <windows.h> // NOLINT |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 class AppRegistrationData; | 24 class AppRegistrationData; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 installer::ArchiveType archive_type, | 155 installer::ArchiveType archive_type, |
| 156 installer::InstallStatus install_status); | 156 installer::InstallStatus install_status); |
| 157 | 157 |
| 158 // Returns true if this distribution should set the Omaha experiment_labels | 158 // Returns true if this distribution should set the Omaha experiment_labels |
| 159 // registry value. | 159 // registry value. |
| 160 virtual bool ShouldSetExperimentLabels(); | 160 virtual bool ShouldSetExperimentLabels(); |
| 161 | 161 |
| 162 virtual bool HasUserExperiments(); | 162 virtual bool HasUserExperiments(); |
| 163 | 163 |
| 164 protected: | 164 protected: |
| 165 BrowserDistribution(Type type, scoped_ptr<AppRegistrationData> app_reg_data); | 165 BrowserDistribution(Type type, |
| 166 std::unique_ptr<AppRegistrationData> app_reg_data); |
| 166 | 167 |
| 167 template<class DistributionClass> | 168 template<class DistributionClass> |
| 168 static BrowserDistribution* GetOrCreateBrowserDistribution( | 169 static BrowserDistribution* GetOrCreateBrowserDistribution( |
| 169 BrowserDistribution** dist); | 170 BrowserDistribution** dist); |
| 170 | 171 |
| 171 const Type type_; | 172 const Type type_; |
| 172 | 173 |
| 173 scoped_ptr<AppRegistrationData> app_reg_data_; | 174 std::unique_ptr<AppRegistrationData> app_reg_data_; |
| 174 | 175 |
| 175 private: | 176 private: |
| 176 BrowserDistribution(); | 177 BrowserDistribution(); |
| 177 | 178 |
| 178 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 179 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
| 179 }; | 180 }; |
| 180 | 181 |
| 181 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 182 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| OLD | NEW |