| 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" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 bool IsChromeFrameModule() { | 52 bool IsChromeFrameModule() { |
| 53 base::FilePath module_path; | 53 base::FilePath module_path; |
| 54 PathService::Get(base::FILE_MODULE, &module_path); | 54 PathService::Get(base::FILE_MODULE, &module_path); |
| 55 return base::FilePath::CompareEqualIgnoreCase(module_path.BaseName().value(), | 55 return base::FilePath::CompareEqualIgnoreCase(module_path.BaseName().value(), |
| 56 installer::kChromeFrameDll); | 56 installer::kChromeFrameDll); |
| 57 } | 57 } |
| 58 | 58 |
| 59 BrowserDistribution::Type GetCurrentDistributionType() { | 59 BrowserDistribution::Type GetCurrentDistributionType() { |
| 60 // TODO(erikwright): If the app host is installed, but not Chrome, perhaps | 60 // TODO(erikwright): If the app host is installed, but not Chrome, perhaps |
| 61 // this should return CHROME_APP_HOST. | 61 // this should return CHROME_APP_HOST. |
| 62 static BrowserDistribution::Type type = | 62 return BrowserDistribution::CHROME_BROWSER; |
| 63 (MasterPreferences::ForCurrentProcess().install_chrome_frame() || | |
| 64 IsChromeFrameModule()) ? | |
| 65 BrowserDistribution::CHROME_FRAME : | |
| 66 BrowserDistribution::CHROME_BROWSER; | |
| 67 return type; | |
| 68 } | 63 } |
| 69 | 64 |
| 70 } // end namespace | 65 } // end namespace |
| 71 | 66 |
| 72 BrowserDistribution::BrowserDistribution() | 67 BrowserDistribution::BrowserDistribution() |
| 73 : type_(CHROME_BROWSER) { | 68 : type_(CHROME_BROWSER) { |
| 74 } | 69 } |
| 75 | 70 |
| 76 BrowserDistribution::BrowserDistribution(Type type) | 71 BrowserDistribution::BrowserDistribution(Type type) |
| 77 : type_(type) { | 72 : type_(type) { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 installer::InstallStatus install_status) { | 294 installer::InstallStatus install_status) { |
| 300 } | 295 } |
| 301 | 296 |
| 302 bool BrowserDistribution::ShouldSetExperimentLabels() { | 297 bool BrowserDistribution::ShouldSetExperimentLabels() { |
| 303 return false; | 298 return false; |
| 304 } | 299 } |
| 305 | 300 |
| 306 bool BrowserDistribution::HasUserExperiments() { | 301 bool BrowserDistribution::HasUserExperiments() { |
| 307 return false; | 302 return false; |
| 308 } | 303 } |
| OLD | NEW |