| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/plugins/plugin_finder.h" | 5 #include "chrome/browser/plugins/plugin_finder.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| 9 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 10 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
| 11 #include "base/prefs/pref_registry_simple.h" | 13 #include "base/prefs/pref_registry_simple.h" |
| 12 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
| 13 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 14 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/values.h" | 18 #include "base/values.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 metadata->AddMatchingMimeType(plugin.mime_types[i].mime_type); | 378 metadata->AddMatchingMimeType(plugin.mime_types[i].mime_type); |
| 377 | 379 |
| 378 DCHECK(metadata->MatchesPlugin(plugin)); | 380 DCHECK(metadata->MatchesPlugin(plugin)); |
| 379 if (identifier_plugin_.find(identifier) != identifier_plugin_.end()) | 381 if (identifier_plugin_.find(identifier) != identifier_plugin_.end()) |
| 380 identifier = GetLongIdentifier(plugin); | 382 identifier = GetLongIdentifier(plugin); |
| 381 | 383 |
| 382 DCHECK(identifier_plugin_.find(identifier) == identifier_plugin_.end()); | 384 DCHECK(identifier_plugin_.find(identifier) == identifier_plugin_.end()); |
| 383 identifier_plugin_[identifier] = metadata; | 385 identifier_plugin_[identifier] = metadata; |
| 384 return metadata->Clone(); | 386 return metadata->Clone(); |
| 385 } | 387 } |
| OLD | NEW |