| 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_verifier.h" | 5 #include "extensions/browser/content_verifier.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 ContentVerifier::~ContentVerifier() { | 77 ContentVerifier::~ContentVerifier() { |
| 78 } | 78 } |
| 79 | 79 |
| 80 void ContentVerifier::Start() { | 80 void ContentVerifier::Start() { |
| 81 ExtensionRegistry* registry = ExtensionRegistry::Get(context_); | 81 ExtensionRegistry* registry = ExtensionRegistry::Get(context_); |
| 82 observer_.Add(registry); | 82 observer_.Add(registry); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void ContentVerifier::Shutdown() { | 85 void ContentVerifier::Shutdown() { |
| 86 shutdown_ = true; | 86 shutdown_ = true; |
| 87 delegate_->Shutdown(); |
| 87 content::BrowserThread::PostTask( | 88 content::BrowserThread::PostTask( |
| 88 content::BrowserThread::IO, | 89 content::BrowserThread::IO, |
| 89 FROM_HERE, | 90 FROM_HERE, |
| 90 base::Bind(&ContentVerifierIOData::Clear, io_data_)); | 91 base::Bind(&ContentVerifierIOData::Clear, io_data_)); |
| 91 observer_.RemoveAll(); | 92 observer_.RemoveAll(); |
| 92 fetcher_.reset(); | 93 fetcher_.reset(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 ContentVerifyJob* ContentVerifier::CreateJobFor( | 96 ContentVerifyJob* ContentVerifier::CreateJobFor( |
| 96 const std::string& extension_id, | 97 const std::string& extension_id, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 !extension_l10n_util::ShouldSkipValidation( | 286 !extension_l10n_util::ShouldSkipValidation( |
| 286 locales_dir, full_path.DirName(), *all_locales)) | 287 locales_dir, full_path.DirName(), *all_locales)) |
| 287 continue; | 288 continue; |
| 288 } | 289 } |
| 289 return true; | 290 return true; |
| 290 } | 291 } |
| 291 return false; | 292 return false; |
| 292 } | 293 } |
| 293 | 294 |
| 294 } // namespace extensions | 295 } // namespace extensions |
| OLD | NEW |