OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/search_engines/search_host_to_urls_map.h" | 5 #include "chrome/browser/search_engines/search_host_to_urls_map.h" |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "base/task.h" |
8 #include "chrome/browser/search_engines/template_url.h" | 9 #include "chrome/browser/search_engines/template_url.h" |
9 #include "chrome/browser/search_engines/template_url_model.h" | 10 #include "chrome/browser/search_engines/template_url_model.h" |
10 | 11 |
11 SearchHostToURLsMap::SearchHostToURLsMap() | 12 SearchHostToURLsMap::SearchHostToURLsMap() |
12 : initialized_(false) { | 13 : initialized_(false) { |
13 } | 14 } |
14 | 15 |
15 SearchHostToURLsMap::~SearchHostToURLsMap() { | 16 SearchHostToURLsMap::~SearchHostToURLsMap() { |
16 } | 17 } |
17 | 18 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (url_set_iterator != i->second.end()) { | 132 if (url_set_iterator != i->second.end()) { |
132 i->second.erase(url_set_iterator); | 133 i->second.erase(url_set_iterator); |
133 if (i->second.empty()) | 134 if (i->second.empty()) |
134 host_to_urls_map_.erase(i); | 135 host_to_urls_map_.erase(i); |
135 // A given TemplateURL only occurs once in the map. As soon as we find the | 136 // A given TemplateURL only occurs once in the map. As soon as we find the |
136 // entry, stop. | 137 // entry, stop. |
137 return; | 138 return; |
138 } | 139 } |
139 } | 140 } |
140 } | 141 } |
OLD | NEW |