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

Side by Side Diff: chrome/browser/component_updater/ev_whitelist_component_installer.cc

Issue 547603002: Certificate Transparency: Code for unpacking EV cert hashes whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding missing EV initialization to all tests in url_request Created 6 years, 3 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 | « no previous file | net/cert/ct_ev_whitelist.h » ('j') | net/cert/ct_ev_whitelist.h » ('J')
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 "chrome/browser/component_updater/ev_whitelist_component_installer.h" 5 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 .Append(kCompressedEVWhitelistFileName); 58 .Append(kCompressedEVWhitelistFileName);
59 } 59 }
60 60
61 void EVWhitelistComponentInstallerTraits::ComponentReady( 61 void EVWhitelistComponentInstallerTraits::ComponentReady(
62 const base::Version& version, 62 const base::Version& version,
63 const base::FilePath& path, 63 const base::FilePath& path,
64 scoped_ptr<base::DictionaryValue> manifest) { 64 scoped_ptr<base::DictionaryValue> manifest) {
65 VLOG(1) << "Component ready, version " << version.GetString() << " in " 65 VLOG(1) << "Component ready, version " << version.GetString() << " in "
66 << path.value(); 66 << path.value();
67 67
68 // TODO(eranm): Uncomment once https://codereview.chromium.org/462543002/
69 // is in.
70 /*
71 const base::FilePath whitelist_file = GetInstalledPath(path); 68 const base::FilePath whitelist_file = GetInstalledPath(path);
72 base::Callback<void(void)> set_cb = 69 base::Callback<void(void)> set_cb =
73 base::Bind(&net::ct::SetEVWhitelistFromFile, whitelist_file); 70 base::Bind(&net::ct::SetEVWhitelistFromFile, whitelist_file);
74 content::BrowserThread::PostBlockingPoolTask( 71 content::BrowserThread::PostBlockingPoolTask(
75 FROM_HERE, 72 FROM_HERE,
Sorin Jianu 2014/09/12 19:46:54 I think the arguments will fit on line 71. Or cons
Eran Messeri 2014/10/01 16:08:35 Done.
76 set_cb); 73 set_cb);
77 */
78 } 74 }
79 75
80 bool EVWhitelistComponentInstallerTraits::VerifyInstallation( 76 bool EVWhitelistComponentInstallerTraits::VerifyInstallation(
81 const base::FilePath& install_dir) const { 77 const base::FilePath& install_dir) const {
82 const base::FilePath expected_file = GetInstalledPath(install_dir); 78 const base::FilePath expected_file = GetInstalledPath(install_dir);
83 VLOG(1) << "Verifying install: " << expected_file.value(); 79 VLOG(1) << "Verifying install: " << expected_file.value();
84 if (!base::PathExists(expected_file)) { 80 if (!base::PathExists(expected_file)) {
85 VLOG(1) << "File missing."; 81 VLOG(1) << "File missing.";
86 return false; 82 return false;
87 } 83 }
(...skipping 30 matching lines...) Expand all
118 114
119 scoped_ptr<ComponentInstallerTraits> traits( 115 scoped_ptr<ComponentInstallerTraits> traits(
120 new EVWhitelistComponentInstallerTraits()); 116 new EVWhitelistComponentInstallerTraits());
121 // |cus| will take ownership of |installer| during installer->Register(cus). 117 // |cus| will take ownership of |installer| during installer->Register(cus).
122 DefaultComponentInstaller* installer = 118 DefaultComponentInstaller* installer =
123 new DefaultComponentInstaller(traits.Pass()); 119 new DefaultComponentInstaller(traits.Pass());
124 installer->Register(cus); 120 installer->Register(cus);
125 } 121 }
126 122
127 } // namespace component_updater 123 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | net/cert/ct_ev_whitelist.h » ('j') | net/cert/ct_ev_whitelist.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698