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

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

Issue 6825063: Patch for bug 74983 (among others) to be applied to M11 696 branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/696/src
Patch Set: intentionally disabled mac tests. tested by hand. Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/plugin_service.h ('k') | content/common/file_path_watcher/file_path_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "content/browser/plugin_service.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h"
10 #include "base/path_service.h" 11 #include "base/path_service.h"
11 #include "base/string_util.h" 12 #include "base/string_util.h"
12 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
13 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "base/synchronization/waitable_event.h" 16 #include "base/synchronization/waitable_event.h"
16 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chrome_plugin_host.h" 18 #include "chrome/browser/chrome_plugin_host.h"
18 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/plugin_updater.h" 20 #include "chrome/browser/plugin_updater.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 static void PurgePluginListCache(bool reload_pages) { 57 static void PurgePluginListCache(bool reload_pages) {
57 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator(); 58 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator();
58 !it.IsAtEnd(); it.Advance()) { 59 !it.IsAtEnd(); it.Advance()) {
59 it.GetCurrentValue()->Send(new ViewMsg_PurgePluginListCache(reload_pages)); 60 it.GetCurrentValue()->Send(new ViewMsg_PurgePluginListCache(reload_pages));
60 } 61 }
61 } 62 }
62 63
63 #if defined(OS_LINUX) 64 #if defined(OS_LINUX)
64 // Delegate class for monitoring directories. 65 // Delegate class for monitoring directories.
65 class PluginDirWatcherDelegate : public FilePathWatcher::Delegate { 66 class PluginDirWatcherDelegate : public FilePathWatcher::Delegate {
66 virtual void OnFilePathChanged(const FilePath& path) { 67 virtual void OnFilePathChanged(const FilePath& path) OVERRIDE {
67 VLOG(1) << "Watched path changed: " << path.value(); 68 VLOG(1) << "Watched path changed: " << path.value();
68 // Make the plugin list update itself 69 // Make the plugin list update itself
69 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 70 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
70 } 71 }
71 virtual void OnError() { 72 virtual void OnFilePathError(const FilePath& path) OVERRIDE {
72 // TODO(pastarmovj): Add some sensible error handling. Maybe silently 73 // TODO(pastarmovj): Add some sensible error handling. Maybe silently
73 // stopping the watcher would be enough. Or possibly restart it. 74 // stopping the watcher would be enough. Or possibly restart it.
74 NOTREACHED(); 75 NOTREACHED();
75 } 76 }
76 }; 77 };
77 #endif 78 #endif
78 79
79 // static 80 // static
80 bool PluginService::enable_chrome_plugins_ = true; 81 bool PluginService::enable_chrome_plugins_ = true;
81 82
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 #if defined(OS_LINUX) 580 #if defined(OS_LINUX)
580 // static 581 // static
581 void PluginService::RegisterFilePathWatcher( 582 void PluginService::RegisterFilePathWatcher(
582 FilePathWatcher *watcher, 583 FilePathWatcher *watcher,
583 const FilePath& path, 584 const FilePath& path,
584 FilePathWatcher::Delegate* delegate) { 585 FilePathWatcher::Delegate* delegate) {
585 bool result = watcher->Watch(path, delegate); 586 bool result = watcher->Watch(path, delegate);
586 DCHECK(result); 587 DCHECK(result);
587 } 588 }
588 #endif 589 #endif
OLDNEW
« no previous file with comments | « content/browser/plugin_service.h ('k') | content/common/file_path_watcher/file_path_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698