Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: content/browser/plugin_service_impl.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/browser/plugin_service_impl.h" 5 #include "content/browser/plugin_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 const base::FilePath& path) { 574 const base::FilePath& path) {
575 base::string16 plugin_name = path.LossyDisplayName(); 575 base::string16 plugin_name = path.LossyDisplayName();
576 WebPluginInfo info; 576 WebPluginInfo info;
577 if (PluginService::GetInstance()->GetPluginInfoByPath(path, &info) && 577 if (PluginService::GetInstance()->GetPluginInfoByPath(path, &info) &&
578 !info.name.empty()) { 578 !info.name.empty()) {
579 plugin_name = info.name; 579 plugin_name = info.name;
580 #if defined(OS_MACOSX) 580 #if defined(OS_MACOSX)
581 // Many plugins on the Mac have .plugin in the actual name, which looks 581 // Many plugins on the Mac have .plugin in the actual name, which looks
582 // terrible, so look for that and strip it off if present. 582 // terrible, so look for that and strip it off if present.
583 const std::string kPluginExtension = ".plugin"; 583 const std::string kPluginExtension = ".plugin";
584 if (base::EndsWith(plugin_name, base::ASCIIToUTF16(kPluginExtension), true)) 584 if (base::EndsWith(plugin_name, base::ASCIIToUTF16(kPluginExtension),
585 base::CompareCase::SENSITIVE))
585 plugin_name.erase(plugin_name.length() - kPluginExtension.length()); 586 plugin_name.erase(plugin_name.length() - kPluginExtension.length());
586 #endif // OS_MACOSX 587 #endif // OS_MACOSX
587 } 588 }
588 return plugin_name; 589 return plugin_name;
589 } 590 }
590 591
591 void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) { 592 void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) {
592 scoped_refptr<base::SingleThreadTaskRunner> target_task_runner( 593 scoped_refptr<base::SingleThreadTaskRunner> target_task_runner(
593 base::ThreadTaskRunnerHandle::Get()); 594 base::ThreadTaskRunnerHandle::Get());
594 595
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 #endif 871 #endif
871 872
872 bool PluginServiceImpl::PpapiDevChannelSupported( 873 bool PluginServiceImpl::PpapiDevChannelSupported(
873 BrowserContext* browser_context, 874 BrowserContext* browser_context,
874 const GURL& document_url) { 875 const GURL& document_url) {
875 return content::GetContentClient()->browser()-> 876 return content::GetContentClient()->browser()->
876 IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url); 877 IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url);
877 } 878 }
878 879
879 } // namespace content 880 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698