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 } | |
Devlin
2017/02/17 15:57:38
nit: \n
atuchin
2017/02/17 16:22:46
Done.
| |
56 const ExtensionSet& InfoMap::disabled_extensions() const { | |
57 CheckOnValidThread(); | |
58 return disabled_extensions_; | |
59 } | |
60 | |
52 void InfoMap::AddExtension(const Extension* extension, | 61 void InfoMap::AddExtension(const Extension* extension, |
53 base::Time install_time, | 62 base::Time install_time, |
54 bool incognito_enabled, | 63 bool incognito_enabled, |
55 bool notifications_disabled) { | 64 bool notifications_disabled) { |
56 CheckOnValidThread(); | 65 CheckOnValidThread(); |
57 extensions_.Insert(extension); | 66 extensions_.Insert(extension); |
58 disabled_extensions_.Remove(extension->id()); | 67 disabled_extensions_.Remove(extension->id()); |
59 | 68 |
60 extra_data_[extension->id()].install_time = install_time; | 69 extra_data_[extension->id()].install_time = install_time; |
61 extra_data_[extension->id()].incognito_enabled = incognito_enabled; | 70 extra_data_[extension->id()].incognito_enabled = incognito_enabled; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 } | 246 } |
238 | 247 |
239 InfoMap::~InfoMap() { | 248 InfoMap::~InfoMap() { |
240 if (quota_service_) { | 249 if (quota_service_) { |
241 BrowserThread::DeleteSoon( | 250 BrowserThread::DeleteSoon( |
242 BrowserThread::IO, FROM_HERE, quota_service_.release()); | 251 BrowserThread::IO, FROM_HERE, quota_service_.release()); |
243 } | 252 } |
244 } | 253 } |
245 | 254 |
246 } // namespace extensions | 255 } // namespace extensions |
OLD | NEW |