OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/info_map.h" | 5 #include "extensions/browser/info_map.h" |
6 | 6 |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 #include "extensions/browser/content_verifier.h" | 9 #include "extensions/browser/content_verifier.h" |
10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 InfoMap::ExtraData::ExtraData() | 43 InfoMap::ExtraData::ExtraData() |
44 : incognito_enabled(false), notifications_disabled(false) { | 44 : incognito_enabled(false), notifications_disabled(false) { |
45 } | 45 } |
46 | 46 |
47 InfoMap::ExtraData::~ExtraData() {} | 47 InfoMap::ExtraData::~ExtraData() {} |
48 | 48 |
49 InfoMap::InfoMap() { | 49 InfoMap::InfoMap() { |
50 } | 50 } |
51 | 51 |
| 52 const ExtensionSet& InfoMap::extensions() const { |
| 53 CheckOnValidThread(); |
| 54 return extensions_; |
| 55 } |
| 56 |
| 57 const ExtensionSet& InfoMap::disabled_extensions() const { |
| 58 CheckOnValidThread(); |
| 59 return disabled_extensions_; |
| 60 } |
| 61 |
52 void InfoMap::AddExtension(const Extension* extension, | 62 void InfoMap::AddExtension(const Extension* extension, |
53 base::Time install_time, | 63 base::Time install_time, |
54 bool incognito_enabled, | 64 bool incognito_enabled, |
55 bool notifications_disabled) { | 65 bool notifications_disabled) { |
56 CheckOnValidThread(); | 66 CheckOnValidThread(); |
57 extensions_.Insert(extension); | 67 extensions_.Insert(extension); |
58 disabled_extensions_.Remove(extension->id()); | 68 disabled_extensions_.Remove(extension->id()); |
59 | 69 |
60 extra_data_[extension->id()].install_time = install_time; | 70 extra_data_[extension->id()].install_time = install_time; |
61 extra_data_[extension->id()].incognito_enabled = incognito_enabled; | 71 extra_data_[extension->id()].incognito_enabled = incognito_enabled; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 247 } |
238 | 248 |
239 InfoMap::~InfoMap() { | 249 InfoMap::~InfoMap() { |
240 if (quota_service_) { | 250 if (quota_service_) { |
241 BrowserThread::DeleteSoon( | 251 BrowserThread::DeleteSoon( |
242 BrowserThread::IO, FROM_HERE, quota_service_.release()); | 252 BrowserThread::IO, FROM_HERE, quota_service_.release()); |
243 } | 253 } |
244 } | 254 } |
245 | 255 |
246 } // namespace extensions | 256 } // namespace extensions |
OLD | NEW |