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