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

Side by Side Diff: chrome/browser/extensions/chrome_content_verifier_delegate.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/chrome_content_verifier_delegate.h" 5 #include "chrome/browser/extensions/chrome_content_verifier_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 << extension->name() 181 << extension->name()
182 << "') due to content verification failure. In tests you " 182 << "') due to content verification failure. In tests you "
183 << "might want to use a ScopedIgnoreContentVerifierForTest " 183 << "might want to use a ScopedIgnoreContentVerifierForTest "
184 << "instance to prevent this."; 184 << "instance to prevent this.";
185 system->extension_service()->DisableExtension(extension_id, 185 system->extension_service()->DisableExtension(extension_id,
186 Extension::DISABLE_CORRUPTED); 186 Extension::DISABLE_CORRUPTED);
187 ExtensionPrefs::Get(context_)->IncrementCorruptedDisableCount(); 187 ExtensionPrefs::Get(context_)->IncrementCorruptedDisableCount();
188 UMA_HISTOGRAM_BOOLEAN("Extensions.CorruptExtensionBecameDisabled", true); 188 UMA_HISTOGRAM_BOOLEAN("Extensions.CorruptExtensionBecameDisabled", true);
189 UMA_HISTOGRAM_ENUMERATION("Extensions.CorruptExtensionDisabledReason", 189 UMA_HISTOGRAM_ENUMERATION("Extensions.CorruptExtensionDisabledReason",
190 reason, ContentVerifyJob::FAILURE_REASON_MAX); 190 reason, ContentVerifyJob::FAILURE_REASON_MAX);
191 } else if (!ContainsKey(would_be_disabled_ids_, extension_id)) { 191 } else if (!base::ContainsKey(would_be_disabled_ids_, extension_id)) {
192 UMA_HISTOGRAM_BOOLEAN("Extensions.CorruptExtensionWouldBeDisabled", true); 192 UMA_HISTOGRAM_BOOLEAN("Extensions.CorruptExtensionWouldBeDisabled", true);
193 would_be_disabled_ids_.insert(extension_id); 193 would_be_disabled_ids_.insert(extension_id);
194 } 194 }
195 } 195 }
196 196
197 void ChromeContentVerifierDelegate::LogFailureForPolicyForceInstall( 197 void ChromeContentVerifierDelegate::LogFailureForPolicyForceInstall(
198 const std::string& extension_id) { 198 const std::string& extension_id) {
199 if (!ContainsKey(corrupt_policy_extensions_, extension_id)) { 199 if (!base::ContainsKey(corrupt_policy_extensions_, extension_id)) {
200 corrupt_policy_extensions_.insert(extension_id); 200 corrupt_policy_extensions_.insert(extension_id);
201 UMA_HISTOGRAM_BOOLEAN("Extensions.CorruptPolicyExtensionWouldBeDisabled", 201 UMA_HISTOGRAM_BOOLEAN("Extensions.CorruptPolicyExtensionWouldBeDisabled",
202 true); 202 true);
203 } 203 }
204 } 204 }
205 205
206 } // namespace extensions 206 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/blacklist_state_fetcher.cc ('k') | chrome/browser/extensions/component_migration_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698