Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/common/metrics_constants_util_win.cc

Issue 2622883002: Remove BrowserDistribution::Type. (Closed)
Patch Set: fdoray comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/profile_resetter/profile_resetter.cc ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "chrome/common/metrics_constants_util_win.h" 5 #include "chrome/common/metrics_constants_util_win.h"
6 6
7 #include "chrome/installer/util/browser_distribution.h" 7 #include "chrome/installer/util/browser_distribution.h"
8 8
9 namespace { 9 namespace {
10 10
11 // Returns the registry path for this product with |suffix| appended to it. 11 // Returns the registry path for this product with |suffix| appended to it.
12 // |suffix| is expected to provide the separator. 12 // |suffix| is expected to provide the separator.
13 base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) { 13 base::string16 GetSuffixedRegistryPath(const wchar_t* suffix) {
14 BrowserDistribution* chrome_distribution = 14 BrowserDistribution* chrome_distribution =
15 BrowserDistribution::GetDistribution(); 15 BrowserDistribution::GetDistribution();
16 DCHECK(chrome_distribution); 16 DCHECK(chrome_distribution);
17 DCHECK_EQ(BrowserDistribution::CHROME_BROWSER,
18 chrome_distribution->GetType());
19 17
20 DCHECK_EQ(L'\\', *suffix); 18 DCHECK_EQ(L'\\', *suffix);
21 DCHECK_NE(L'\\', chrome_distribution->GetRegistryPath().back()); 19 DCHECK_NE(L'\\', chrome_distribution->GetRegistryPath().back());
22 20
23 return chrome_distribution->GetRegistryPath() + suffix; 21 return chrome_distribution->GetRegistryPath() + suffix;
24 } 22 }
25 23
26 } // namespace 24 } // namespace
27 25
28 namespace chrome { 26 namespace chrome {
29 27
30 base::string16 GetBrowserExitCodesRegistryPath() { 28 base::string16 GetBrowserExitCodesRegistryPath() {
31 return GetSuffixedRegistryPath(L"\\BrowserExitCodes"); 29 return GetSuffixedRegistryPath(L"\\BrowserExitCodes");
32 } 30 }
33 31
34 } // namespace chrome 32 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/profile_resetter/profile_resetter.cc ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698