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 defines a class that contains various method related to branding. | 5 // This file defines a class that contains various method related to branding. |
6 // It provides only default implementations of these methods. Usually to add | 6 // It provides only default implementations of these methods. Usually to add |
7 // specific branding, we will need to extend this class with a custom | 7 // specific branding, we will need to extend this class with a custom |
8 // implementation. | 8 // implementation. |
9 | 9 |
10 #include "chrome/installer/util/browser_distribution.h" | 10 #include "chrome/installer/util/browser_distribution.h" |
11 | 11 |
| 12 #include <utility> |
| 13 |
12 #include "base/atomicops.h" | 14 #include "base/atomicops.h" |
13 #include "base/command_line.h" | 15 #include "base/command_line.h" |
14 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
15 #include "base/logging.h" | 17 #include "base/logging.h" |
16 #include "base/win/registry.h" | 18 #include "base/win/registry.h" |
17 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
18 #include "chrome/common/chrome_icon_resources_win.h" | 20 #include "chrome/common/chrome_icon_resources_win.h" |
19 #include "chrome/common/env_vars.h" | 21 #include "chrome/common/env_vars.h" |
20 #include "chrome/installer/util/app_registration_data.h" | 22 #include "chrome/installer/util/app_registration_data.h" |
21 #include "chrome/installer/util/chrome_frame_distribution.h" | 23 #include "chrome/installer/util/chrome_frame_distribution.h" |
(...skipping 28 matching lines...) Expand all Loading... |
50 | 52 |
51 } // namespace | 53 } // namespace |
52 | 54 |
53 BrowserDistribution::BrowserDistribution() | 55 BrowserDistribution::BrowserDistribution() |
54 : type_(CHROME_BROWSER), | 56 : type_(CHROME_BROWSER), |
55 app_reg_data_(make_scoped_ptr( | 57 app_reg_data_(make_scoped_ptr( |
56 new NonUpdatingAppRegistrationData(L"Software\\Chromium"))) { | 58 new NonUpdatingAppRegistrationData(L"Software\\Chromium"))) { |
57 } | 59 } |
58 | 60 |
59 BrowserDistribution::BrowserDistribution( | 61 BrowserDistribution::BrowserDistribution( |
60 Type type, scoped_ptr<AppRegistrationData> app_reg_data) | 62 Type type, |
61 : type_(type), app_reg_data_(app_reg_data.Pass()) { | 63 scoped_ptr<AppRegistrationData> app_reg_data) |
62 } | 64 : type_(type), app_reg_data_(std::move(app_reg_data)) {} |
63 | 65 |
64 BrowserDistribution::~BrowserDistribution() {} | 66 BrowserDistribution::~BrowserDistribution() {} |
65 | 67 |
66 template<class DistributionClass> | 68 template<class DistributionClass> |
67 BrowserDistribution* BrowserDistribution::GetOrCreateBrowserDistribution( | 69 BrowserDistribution* BrowserDistribution::GetOrCreateBrowserDistribution( |
68 BrowserDistribution** dist) { | 70 BrowserDistribution** dist) { |
69 if (!*dist) { | 71 if (!*dist) { |
70 DistributionClass* temp = new DistributionClass(); | 72 DistributionClass* temp = new DistributionClass(); |
71 if (base::subtle::NoBarrier_CompareAndSwap( | 73 if (base::subtle::NoBarrier_CompareAndSwap( |
72 reinterpret_cast<base::subtle::AtomicWord*>(dist), NULL, | 74 reinterpret_cast<base::subtle::AtomicWord*>(dist), NULL, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 installer::InstallStatus install_status) { | 265 installer::InstallStatus install_status) { |
264 } | 266 } |
265 | 267 |
266 bool BrowserDistribution::ShouldSetExperimentLabels() { | 268 bool BrowserDistribution::ShouldSetExperimentLabels() { |
267 return false; | 269 return false; |
268 } | 270 } |
269 | 271 |
270 bool BrowserDistribution::HasUserExperiments() { | 272 bool BrowserDistribution::HasUserExperiments() { |
271 return false; | 273 return false; |
272 } | 274 } |
OLD | NEW |