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

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

Issue 1255073002: clang/win: Fix most -Wunused-function warnings in Chromium code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac Created 5 years, 4 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 #if defined(OS_MACOSX) 101 #if defined(OS_MACOSX)
102 void NotifyPluginsOfActivation() { 102 void NotifyPluginsOfActivation() {
103 DCHECK_CURRENTLY_ON(BrowserThread::IO); 103 DCHECK_CURRENTLY_ON(BrowserThread::IO);
104 104
105 for (PluginProcessHostIterator iter; !iter.Done(); ++iter) 105 for (PluginProcessHostIterator iter; !iter.Done(); ++iter)
106 iter->OnAppActivation(); 106 iter->OnAppActivation();
107 } 107 }
108 #endif 108 #endif
109 109
110 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) 110 #if defined(OS_POSIX)
111 #if !defined(OS_OPENBSD) && !defined(OS_ANDROID)
111 void NotifyPluginDirChanged(const base::FilePath& path, bool error) { 112 void NotifyPluginDirChanged(const base::FilePath& path, bool error) {
112 if (error) { 113 if (error) {
113 // TODO(pastarmovj): Add some sensible error handling. Maybe silently 114 // TODO(pastarmovj): Add some sensible error handling. Maybe silently
114 // stopping the watcher would be enough. Or possibly restart it. 115 // stopping the watcher would be enough. Or possibly restart it.
115 NOTREACHED(); 116 NOTREACHED();
116 return; 117 return;
117 } 118 }
118 VLOG(1) << "Watched path changed: " << path.value(); 119 VLOG(1) << "Watched path changed: " << path.value();
119 // Make the plugin list update itself 120 // Make the plugin list update itself
120 PluginList::Singleton()->RefreshPlugins(); 121 PluginList::Singleton()->RefreshPlugins();
121 BrowserThread::PostTask( 122 BrowserThread::PostTask(
122 BrowserThread::UI, FROM_HERE, 123 BrowserThread::UI, FROM_HERE,
123 base::Bind(&PluginService::PurgePluginListCache, 124 base::Bind(&PluginService::PurgePluginListCache,
124 static_cast<BrowserContext*>(NULL), false)); 125 static_cast<BrowserContext*>(NULL), false));
125 } 126 }
126 #endif 127 #endif // !defined(OS_OPENBSD) && !defined(OS_ANDROID)
127 128
128 void ForwardCallback(base::SingleThreadTaskRunner* target_task_runner, 129 void ForwardCallback(base::SingleThreadTaskRunner* target_task_runner,
129 const PluginService::GetPluginsCallback& callback, 130 const PluginService::GetPluginsCallback& callback,
130 const std::vector<WebPluginInfo>& plugins) { 131 const std::vector<WebPluginInfo>& plugins) {
131 target_task_runner->PostTask(FROM_HERE, base::Bind(callback, plugins)); 132 target_task_runner->PostTask(FROM_HERE, base::Bind(callback, plugins));
132 } 133 }
134 #endif // defined(OS_POSIX)
133 135
134 } // namespace 136 } // namespace
135 137
136 // static 138 // static
137 PluginService* PluginService::GetInstance() { 139 PluginService* PluginService::GetInstance() {
138 return PluginServiceImpl::GetInstance(); 140 return PluginServiceImpl::GetInstance();
139 } 141 }
140 142
141 void PluginService::PurgePluginListCache(BrowserContext* browser_context, 143 void PluginService::PurgePluginListCache(BrowserContext* browser_context,
142 bool reload_pages) { 144 bool reload_pages) {
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 #endif 866 #endif
865 867
866 bool PluginServiceImpl::PpapiDevChannelSupported( 868 bool PluginServiceImpl::PpapiDevChannelSupported(
867 BrowserContext* browser_context, 869 BrowserContext* browser_context,
868 const GURL& document_url) { 870 const GURL& document_url) {
869 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( 871 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs(
870 browser_context, document_url); 872 browser_context, document_url);
871 } 873 }
872 874
873 } // namespace content 875 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698