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

Side by Side Diff: extensions/browser/runtime_data.cc

Issue 2442213003: Remove dead extensions tracking code. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « extensions/browser/runtime_data.h ('k') | extensions/browser/runtime_data_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "extensions/browser/runtime_data.h" 5 #include "extensions/browser/runtime_data.h"
6 6
7 #include "extensions/browser/extension_registry.h" 7 #include "extensions/browser/extension_registry.h"
8 #include "extensions/common/extension.h" 8 #include "extensions/common/extension.h"
9 #include "extensions/common/manifest_handlers/background_info.h" 9 #include "extensions/common/manifest_handlers/background_info.h"
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 bool RuntimeData::IsBeingUpgraded(const std::string& extension_id) const { 32 bool RuntimeData::IsBeingUpgraded(const std::string& extension_id) const {
33 return HasFlag(extension_id, BEING_UPGRADED); 33 return HasFlag(extension_id, BEING_UPGRADED);
34 } 34 }
35 35
36 void RuntimeData::SetBeingUpgraded(const std::string& extension_id, 36 void RuntimeData::SetBeingUpgraded(const std::string& extension_id,
37 bool value) { 37 bool value) {
38 SetFlag(extension_id, BEING_UPGRADED, value); 38 SetFlag(extension_id, BEING_UPGRADED, value);
39 } 39 }
40 40
41 bool RuntimeData::HasUsedWebRequest(const std::string& extension_id) const {
42 return HasFlag(extension_id, HAS_USED_WEBREQUEST);
43 }
44
45 void RuntimeData::SetHasUsedWebRequest(const std::string& extension_id,
46 bool value) {
47 SetFlag(extension_id, HAS_USED_WEBREQUEST, value);
48 }
49
50 bool RuntimeData::HasExtensionForTesting( 41 bool RuntimeData::HasExtensionForTesting(
51 const std::string& extension_id) const { 42 const std::string& extension_id) const {
52 return extension_flags_.find(extension_id) != extension_flags_.end(); 43 return extension_flags_.find(extension_id) != extension_flags_.end();
53 } 44 }
54 45
55 void RuntimeData::ClearAll() { 46 void RuntimeData::ClearAll() {
56 extension_flags_.clear(); 47 extension_flags_.clear();
57 } 48 }
58 49
59 void RuntimeData::OnExtensionUnloaded(content::BrowserContext* browser_context, 50 void RuntimeData::OnExtensionUnloaded(content::BrowserContext* browser_context,
(...skipping 15 matching lines...) Expand all
75 void RuntimeData::SetFlag(const std::string& extension_id, 66 void RuntimeData::SetFlag(const std::string& extension_id,
76 RuntimeFlag flag, 67 RuntimeFlag flag,
77 bool value) { 68 bool value) {
78 if (value) 69 if (value)
79 extension_flags_[extension_id] |= flag; 70 extension_flags_[extension_id] |= flag;
80 else 71 else
81 extension_flags_[extension_id] &= ~flag; 72 extension_flags_[extension_id] &= ~flag;
82 } 73 }
83 74
84 } // namespace extensions 75 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/runtime_data.h ('k') | extensions/browser/runtime_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698