Commit 12ed37dd authored by Oleg Davydov's avatar Oleg Davydov Committed by Commit Bot

Make ContentHash::has_verifier_contents private

Whether we have loaded or not valid verified_contents.json is an
internal detail of ContentHash class, which doesn't need to be exposed
to clients.

The only external usage of this is passing it to
ContentVerifier::TestObserver. But TestObserver and its implementations
never used this flag since TestObserver introducing in
https://codereview.chromium.org/1250473002. Therefore it is possible and
makes sense to change it to overall success flag.

Bug: 796395
Change-Id: Ibd48b998a4c42d68e30549a4078184179f5593e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810358Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: default avatarAnatoliy Potapchuk <apotapchuk@chromium.org>
Commit-Queue: Oleg Davydov <burunduk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701967}
parent 358087e7
...@@ -588,7 +588,7 @@ void ContentVerifier::OnFetchComplete( ...@@ -588,7 +588,7 @@ void ContentVerifier::OnFetchComplete(
ExtensionId extension_id = content_hash->extension_id(); ExtensionId extension_id = content_hash->extension_id();
if (g_content_verifier_test_observer) { if (g_content_verifier_test_observer) {
g_content_verifier_test_observer->OnFetchComplete( g_content_verifier_test_observer->OnFetchComplete(
extension_id, content_hash->has_verified_contents()); extension_id, content_hash->succeeded());
} }
VLOG(1) << "OnFetchComplete " << extension_id VLOG(1) << "OnFetchComplete " << extension_id
......
...@@ -120,10 +120,6 @@ class ContentHash : public base::RefCountedThreadSafe<ContentHash> { ...@@ -120,10 +120,6 @@ class ContentHash : public base::RefCountedThreadSafe<ContentHash> {
const ComputedHashes::Reader& computed_hashes() const; const ComputedHashes::Reader& computed_hashes() const;
bool has_verified_contents() const {
return status_ >= Status::kHasVerifiedContents;
}
bool succeeded() const { return status_ >= Status::kSucceeded; } bool succeeded() const { return status_ >= Status::kSucceeded; }
// If ContentHash creation writes computed_hashes.json, then this returns the // If ContentHash creation writes computed_hashes.json, then this returns the
...@@ -195,6 +191,10 @@ class ContentHash : public base::RefCountedThreadSafe<ContentHash> { ...@@ -195,6 +191,10 @@ class ContentHash : public base::RefCountedThreadSafe<ContentHash> {
bool force_build, bool force_build,
const IsCancelledCallback& is_cancelled); const IsCancelledCallback& is_cancelled);
bool has_verified_contents() const {
return status_ >= Status::kHasVerifiedContents;
}
const ExtensionId extension_id_; const ExtensionId extension_id_;
const base::FilePath extension_root_; const base::FilePath extension_root_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment