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> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/prefs/pref_registry_simple.h" | |
14 #include "base/prefs/pref_service.h" | |
15 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
16 #include "base/strings/sys_string_conversions.h" | 14 #include "base/strings/sys_string_conversions.h" |
17 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
18 #include "base/values.h" | 16 #include "base/values.h" |
19 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/plugins/plugin_metadata.h" | 18 #include "chrome/browser/plugins/plugin_metadata.h" |
21 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 20 #include "components/prefs/pref_registry_simple.h" |
| 21 #include "components/prefs/pref_service.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/plugin_service.h" | 23 #include "content/public/browser/plugin_service.h" |
24 #include "grit/browser_resources.h" | 24 #include "grit/browser_resources.h" |
25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
27 | 27 |
28 #if defined(ENABLE_PLUGIN_INSTALLATION) | 28 #if defined(ENABLE_PLUGIN_INSTALLATION) |
29 #include "chrome/browser/plugins/plugin_installer.h" | 29 #include "chrome/browser/plugins/plugin_installer.h" |
30 #endif | 30 #endif |
31 | 31 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 metadata->AddMatchingMimeType(plugin.mime_types[i].mime_type); | 378 metadata->AddMatchingMimeType(plugin.mime_types[i].mime_type); |
379 | 379 |
380 DCHECK(metadata->MatchesPlugin(plugin)); | 380 DCHECK(metadata->MatchesPlugin(plugin)); |
381 if (identifier_plugin_.find(identifier) != identifier_plugin_.end()) | 381 if (identifier_plugin_.find(identifier) != identifier_plugin_.end()) |
382 identifier = GetLongIdentifier(plugin); | 382 identifier = GetLongIdentifier(plugin); |
383 | 383 |
384 DCHECK(identifier_plugin_.find(identifier) == identifier_plugin_.end()); | 384 DCHECK(identifier_plugin_.find(identifier) == identifier_plugin_.end()); |
385 identifier_plugin_[identifier] = metadata; | 385 identifier_plugin_[identifier] = metadata; |
386 return metadata->Clone(); | 386 return metadata->Clone(); |
387 } | 387 } |
OLD | NEW |