| 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 return BrowserDistribution::CHROME_BROWSER; | 62 static BrowserDistribution::Type type = |
| 63 (MasterPreferences::ForCurrentProcess().install_chrome_frame() || |
| 64 IsChromeFrameModule()) ? |
| 65 BrowserDistribution::CHROME_FRAME : |
| 66 BrowserDistribution::CHROME_BROWSER; |
| 67 return type; |
| 63 } | 68 } |
| 64 | 69 |
| 65 } // end namespace | 70 } // end namespace |
| 66 | 71 |
| 67 BrowserDistribution::BrowserDistribution() | 72 BrowserDistribution::BrowserDistribution() |
| 68 : type_(CHROME_BROWSER) { | 73 : type_(CHROME_BROWSER) { |
| 69 } | 74 } |
| 70 | 75 |
| 71 BrowserDistribution::BrowserDistribution(Type type) | 76 BrowserDistribution::BrowserDistribution(Type type) |
| 72 : type_(type) { | 77 : type_(type) { |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 installer::InstallStatus install_status) { | 300 installer::InstallStatus install_status) { |
| 296 } | 301 } |
| 297 | 302 |
| 298 bool BrowserDistribution::ShouldSetExperimentLabels() { | 303 bool BrowserDistribution::ShouldSetExperimentLabels() { |
| 299 return false; | 304 return false; |
| 300 } | 305 } |
| 301 | 306 |
| 302 bool BrowserDistribution::HasUserExperiments() { | 307 bool BrowserDistribution::HasUserExperiments() { |
| 303 return false; | 308 return false; |
| 304 } | 309 } |
| OLD | NEW |