OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/process_map.h" | 5 #include "chrome/browser/extensions/process_map.h" |
6 | 6 |
7 namespace extensions { | 7 namespace extensions { |
8 | 8 |
9 // Item | 9 // Item |
10 struct ProcessMap::Item { | 10 struct ProcessMap::Item { |
11 Item() { | 11 Item() { |
12 } | 12 } |
13 | 13 |
14 explicit Item(const ProcessMap::Item& other) | 14 // Purposely implicit constructor needed on older gcc's. See: |
| 15 // http://codereview.chromium.org/8769022/ |
| 16 Item(const ProcessMap::Item& other) |
15 : extension_id(other.extension_id), | 17 : extension_id(other.extension_id), |
16 process_id(other.process_id), | 18 process_id(other.process_id), |
17 site_instance_id(other.site_instance_id) { | 19 site_instance_id(other.site_instance_id) { |
18 } | 20 } |
19 | 21 |
20 Item(const std::string& extension_id, int process_id, | 22 Item(const std::string& extension_id, int process_id, |
21 int site_instance_id) | 23 int site_instance_id) |
22 : extension_id(extension_id), | 24 : extension_id(extension_id), |
23 process_id(process_id), | 25 process_id(process_id), |
24 site_instance_id(site_instance_id) { | 26 site_instance_id(site_instance_id) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 std::set<std::string> result; | 106 std::set<std::string> result; |
105 for (ItemSet::const_iterator iter = items_.begin(); iter != items_.end(); | 107 for (ItemSet::const_iterator iter = items_.begin(); iter != items_.end(); |
106 ++iter) { | 108 ++iter) { |
107 if (iter->process_id == process_id) | 109 if (iter->process_id == process_id) |
108 result.insert(iter->extension_id); | 110 result.insert(iter->extension_id); |
109 } | 111 } |
110 return result; | 112 return result; |
111 } | 113 } |
112 | 114 |
113 } // extensions | 115 } // extensions |
OLD | NEW |