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

Side by Side Diff: extensions/browser/extension_prefs.h

Issue 412003003: Additional metrics for disabled extensions and content verification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes from review feedback Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 // Used for verification of installed extension ids. For the Set method, pass 554 // Used for verification of installed extension ids. For the Set method, pass
555 // null to remove the preference. 555 // null to remove the preference.
556 const base::DictionaryValue* GetInstallSignature(); 556 const base::DictionaryValue* GetInstallSignature();
557 void SetInstallSignature(const base::DictionaryValue* signature); 557 void SetInstallSignature(const base::DictionaryValue* signature);
558 558
559 // The installation parameter associated with the extension. 559 // The installation parameter associated with the extension.
560 std::string GetInstallParam(const std::string& extension_id) const; 560 std::string GetInstallParam(const std::string& extension_id) const;
561 void SetInstallParam(const std::string& extension_id, 561 void SetInstallParam(const std::string& extension_id,
562 const std::string& install_parameter); 562 const std::string& install_parameter);
563 563
564 // The total number of times we've disabled an extension due to corrupted
565 // contents.
566 int GetCorruptedDisableCount();
567 void IncrementCorruptedDisableCount();
568
564 private: 569 private:
565 friend class ExtensionPrefsBlacklistedExtensions; // Unit test. 570 friend class ExtensionPrefsBlacklistedExtensions; // Unit test.
566 friend class ExtensionPrefsUninstallExtension; // Unit test. 571 friend class ExtensionPrefsUninstallExtension; // Unit test.
567 572
568 enum DisableReasonChange { 573 enum DisableReasonChange {
569 DISABLE_REASON_ADD, 574 DISABLE_REASON_ADD,
570 DISABLE_REASON_REMOVE, 575 DISABLE_REASON_REMOVE,
571 DISABLE_REASON_CLEAR 576 DISABLE_REASON_CLEAR
572 }; 577 };
573 578
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 bool extensions_disabled_; 717 bool extensions_disabled_;
713 718
714 ObserverList<ExtensionPrefsObserver> observer_list_; 719 ObserverList<ExtensionPrefsObserver> observer_list_;
715 720
716 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 721 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
717 }; 722 };
718 723
719 } // namespace extensions 724 } // namespace extensions
720 725
721 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 726 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698