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

Unified Diff: chrome/browser/component_updater/sth_set_component_installer.h

Issue 2014573002: Certificate Transparency: Wire the TreeStateTracker up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Lei's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/component_updater/sth_set_component_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/sth_set_component_installer.h
diff --git a/chrome/browser/component_updater/sth_set_component_installer.h b/chrome/browser/component_updater/sth_set_component_installer.h
index 4223aa371d544d355d2d13685196b8e28d09f46f..1279706481c10fd0152be8050aa83a0d2d0bf628 100644
--- a/chrome/browser/component_updater/sth_set_component_installer.h
+++ b/chrome/browser/component_updater/sth_set_component_installer.h
@@ -40,8 +40,7 @@ class ComponentUpdateService;
class STHSetComponentInstallerTraits : public ComponentInstallerTraits {
public:
// The |sth_distributor| will be notified each time a new STH is observed.
- explicit STHSetComponentInstallerTraits(
- std::unique_ptr<net::ct::STHObserver> sth_observer);
+ explicit STHSetComponentInstallerTraits(net::ct::STHObserver* sth_observer);
~STHSetComponentInstallerTraits() override;
private:
@@ -73,7 +72,10 @@ class STHSetComponentInstallerTraits : public ComponentInstallerTraits {
// STH parsing failed - do nothing.
void OnJsonParseError(const std::string& log_id, const std::string& error);
- std::unique_ptr<net::ct::STHObserver> sth_observer_;
+ // The observer is not owned by this class, so the code creating an instance
+ // of this class is expected to ensure the STHObserver lives as long as
+ // this class does. Typically the observer provided will be a global.
+ net::ct::STHObserver* sth_observer_;
DISALLOW_COPY_AND_ASSIGN(STHSetComponentInstallerTraits);
};
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/component_updater/sth_set_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698