| 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 "content/common/plugin_list.h" | 5 #include "content/common/plugin_list.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/files/file_enumerator.h" | 11 #include "base/files/file_enumerator.h" |
| 12 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
| 13 #include "base/mac/scoped_cftyperef.h" | 13 #include "base/mac/scoped_cftyperef.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/native_library.h" | 15 #include "base/native_library.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
| 21 | 21 |
| 22 using base::ScopedCFTypeRef; | 22 using base::ScopedCFTypeRef; |
| 23 using webkit::WebPluginInfo; | |
| 24 using webkit::WebPluginMimeType; | |
| 25 | 23 |
| 26 namespace content { | 24 namespace content { |
| 27 | 25 |
| 28 namespace { | 26 namespace { |
| 29 | 27 |
| 30 void GetPluginCommonDirectory(std::vector<base::FilePath>* plugin_dirs, | 28 void GetPluginCommonDirectory(std::vector<base::FilePath>* plugin_dirs, |
| 31 bool user) { | 29 bool user) { |
| 32 // Note that there are no NSSearchPathDirectory constants for these | 30 // Note that there are no NSSearchPathDirectory constants for these |
| 33 // directories so we can't use Cocoa's NSSearchPathForDirectoriesInDomains(). | 31 // directories so we can't use Cocoa's NSSearchPathForDirectoriesInDomains(). |
| 34 // Interestingly, Safari hard-codes the location (see | 32 // Interestingly, Safari hard-codes the location (see |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 false, // not recursive | 289 false, // not recursive |
| 292 base::FileEnumerator::DIRECTORIES); | 290 base::FileEnumerator::DIRECTORIES); |
| 293 for (base::FilePath path = enumerator.Next(); !path.value().empty(); | 291 for (base::FilePath path = enumerator.Next(); !path.value().empty(); |
| 294 path = enumerator.Next()) { | 292 path = enumerator.Next()) { |
| 295 plugins->push_back(path); | 293 plugins->push_back(path); |
| 296 } | 294 } |
| 297 } | 295 } |
| 298 | 296 |
| 299 bool PluginList::ShouldLoadPluginUsingPluginList( | 297 bool PluginList::ShouldLoadPluginUsingPluginList( |
| 300 const WebPluginInfo& info, | 298 const WebPluginInfo& info, |
| 301 std::vector<webkit::WebPluginInfo>* plugins) { | 299 std::vector<WebPluginInfo>* plugins) { |
| 302 return !IsBlacklistedPlugin(info); | 300 return !IsBlacklistedPlugin(info); |
| 303 } | 301 } |
| 304 | 302 |
| 305 } // namespace content | 303 } // namespace content |
| OLD | NEW |