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

Side by Side Diff: components/component_updater/component_updater_paths.cc

Issue 1887743003: Allow the component updater framework to control Origin Trials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ef-finch
Patch Set: Rebase and fix missed scoped_ptr -> unique_ptr conversion Created 4 years, 7 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 | « components/component_updater/component_updater_paths.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/component_updater/component_updater_paths.h" 5 #include "components/component_updater/component_updater_paths.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 9
10 namespace component_updater { 10 namespace component_updater {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 break; 43 break;
44 case DIR_COMPONENT_EV_WHITELIST: 44 case DIR_COMPONENT_EV_WHITELIST:
45 cur = cur.Append(FILE_PATH_LITERAL("EVWhitelist")); 45 cur = cur.Append(FILE_PATH_LITERAL("EVWhitelist"));
46 break; 46 break;
47 case DIR_SUPERVISED_USER_WHITELISTS: 47 case DIR_SUPERVISED_USER_WHITELISTS:
48 cur = cur.Append(FILE_PATH_LITERAL("SupervisedUserWhitelists")); 48 cur = cur.Append(FILE_PATH_LITERAL("SupervisedUserWhitelists"));
49 break; 49 break;
50 case DIR_CERT_TRANS_TREE_STATES: 50 case DIR_CERT_TRANS_TREE_STATES:
51 cur = cur.Append(FILE_PATH_LITERAL("CertificateTransparency")); 51 cur = cur.Append(FILE_PATH_LITERAL("CertificateTransparency"));
52 break; 52 break;
53 case DIR_ORIGIN_TRIAL_KEYS:
54 cur = cur.Append(FILE_PATH_LITERAL("OriginTrials"));
55 break;
53 default: 56 default:
54 return false; 57 return false;
55 } 58 }
56 59
57 *result = cur; 60 *result = cur;
58 return true; 61 return true;
59 } 62 }
60 63
61 // This cannot be done as a static initializer sadly since Visual Studio will 64 // This cannot be done as a static initializer sadly since Visual Studio will
62 // eliminate this object file if there is no direct entry point into it. 65 // eliminate this object file if there is no direct entry point into it.
63 void RegisterPathProvider(int components_root_key) { 66 void RegisterPathProvider(int components_root_key) {
64 DCHECK_EQ(g_components_root_key, -1); 67 DCHECK_EQ(g_components_root_key, -1);
65 DCHECK_GT(components_root_key, 0); 68 DCHECK_GT(components_root_key, 0);
66 DCHECK(components_root_key < PATH_START || components_root_key > PATH_END); 69 DCHECK(components_root_key < PATH_START || components_root_key > PATH_END);
67 70
68 g_components_root_key = components_root_key; 71 g_components_root_key = components_root_key;
69 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 72 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
70 } 73 }
71 74
72 } // namespace component_updater 75 } // namespace component_updater
OLDNEW
« no previous file with comments | « components/component_updater/component_updater_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698