OLD | NEW |
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 "extensions/browser/content_verify_job.h" | 5 #include "extensions/browser/content_verify_job.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 // static | 202 // static |
203 void ContentVerifyJob::SetObserverForTests(TestObserver* observer) { | 203 void ContentVerifyJob::SetObserverForTests(TestObserver* observer) { |
204 g_test_observer = observer; | 204 g_test_observer = observer; |
205 } | 205 } |
206 | 206 |
207 void ContentVerifyJob::DispatchFailureCallback(FailureReason reason) { | 207 void ContentVerifyJob::DispatchFailureCallback(FailureReason reason) { |
208 DCHECK(!failed_); | 208 DCHECK(!failed_); |
209 failed_ = true; | 209 failed_ = true; |
210 if (!failure_callback_.is_null()) { | 210 if (!failure_callback_.is_null()) { |
211 VLOG(1) << "job failed for " << hash_reader_->extension_id() << " " | 211 LOG(WARNING) << "job failed for " << hash_reader_->extension_id() << " " |
212 << hash_reader_->relative_path().MaybeAsASCII() | 212 << hash_reader_->relative_path().MaybeAsASCII() |
213 << " reason:" << reason; | 213 << " reason:" << reason; |
214 failure_callback_.Run(reason); | 214 failure_callback_.Run(reason); |
215 failure_callback_.Reset(); | 215 failure_callback_.Reset(); |
216 } | 216 } |
217 if (g_test_observer) | 217 if (g_test_observer) |
218 g_test_observer->JobFinished( | 218 g_test_observer->JobFinished( |
219 hash_reader_->extension_id(), hash_reader_->relative_path(), failed_); | 219 hash_reader_->extension_id(), hash_reader_->relative_path(), failed_); |
220 } | 220 } |
221 | 221 |
222 } // namespace extensions | 222 } // namespace extensions |
OLD | NEW |