diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 03:28:20 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 03:28:20 +0000 |
commit | 08ffa6bd4032c34c135d23b47276c0a83ab34f76 (patch) | |
tree | 3e5cd86f532dc04214b70ed10886c5cb16b3aeb7 /chrome/browser/extensions | |
parent | a5971dc68d14d4cb063c10138133483a14cd7530 (diff) | |
download | chromium_src-08ffa6bd4032c34c135d23b47276c0a83ab34f76.zip chromium_src-08ffa6bd4032c34c135d23b47276c0a83ab34f76.tar.gz chromium_src-08ffa6bd4032c34c135d23b47276c0a83ab34f76.tar.bz2 |
Rever r31175 r31176 r31187
XP tests are failing, the guess is r31175 and r31176.
TBR=beng
TEST=XP tests go green
Review URL: http://codereview.chromium.org/376008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
22 files changed, 20 insertions, 114 deletions
diff --git a/chrome/browser/extensions/extension_browser_actions_api.h b/chrome/browser/extensions/extension_browser_actions_api.h index fceab48..f892551 100644 --- a/chrome/browser/extensions/extension_browser_actions_api.h +++ b/chrome/browser/extensions/extension_browser_actions_api.h @@ -14,7 +14,6 @@ class ExtensionActionState; class BrowserActionFunction : public SyncExtensionFunction { protected: BrowserActionFunction() : tab_id_(ExtensionAction::kDefaultTabId) {} - virtual ~BrowserActionFunction() {} virtual bool RunImpl(); virtual bool RunBrowserAction() = 0; @@ -31,26 +30,22 @@ class BrowserActionFunction : public SyncExtensionFunction { }; class BrowserActionSetIconFunction : public BrowserActionFunction { - ~BrowserActionSetIconFunction() {} virtual bool RunBrowserAction(); DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setIcon") }; class BrowserActionSetTitleFunction : public BrowserActionFunction { - ~BrowserActionSetTitleFunction() {} virtual bool RunBrowserAction(); DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setTitle") }; class BrowserActionSetBadgeTextFunction : public BrowserActionFunction { - ~BrowserActionSetBadgeTextFunction() {} virtual bool RunBrowserAction(); DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeText") }; class BrowserActionSetBadgeBackgroundColorFunction : public BrowserActionFunction { - ~BrowserActionSetBadgeBackgroundColorFunction() {} virtual bool RunBrowserAction(); DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeBackgroundColor") }; diff --git a/chrome/browser/extensions/extension_devtools_manager.h b/chrome/browser/extensions/extension_devtools_manager.h index f1337ef..35e7cec 100644 --- a/chrome/browser/extensions/extension_devtools_manager.h +++ b/chrome/browser/extensions/extension_devtools_manager.h @@ -34,6 +34,7 @@ class ExtensionDevToolsManager public: // UI thread only: explicit ExtensionDevToolsManager(Profile* profile); + ~ExtensionDevToolsManager(); void AddEventListener(const std::string& event_name, int render_process_id); @@ -44,9 +45,6 @@ class ExtensionDevToolsManager void BridgeClosingForTab(int tab_id); private: - friend class base::RefCountedThreadSafe<ExtensionDevToolsManager>; - - ~ExtensionDevToolsManager(); // Map of tab IDs to the ExtensionDevToolsBridge connected to the tab std::map<int, linked_ptr<ExtensionDevToolsBridge> > tab_id_to_bridge_; diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc index 44f819f..0d0d7b4 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc @@ -37,6 +37,9 @@ class ExtensionDisabledDialogDelegate NewRunnableMethod(this, &ExtensionDisabledDialogDelegate::Start)); } + virtual ~ExtensionDisabledDialogDelegate() { + } + // ExtensionInstallUI::Delegate virtual void ContinueInstall() { service_->EnableExtension(extension_->id()); @@ -48,10 +51,6 @@ class ExtensionDisabledDialogDelegate } private: - friend class base::RefCountedThreadSafe<ExtensionDisabledDialogDelegate>; - - virtual ~ExtensionDisabledDialogDelegate() {} - void Start() { // We start on the file thread so we can decode the install icon. FilePath install_icon_path = install_icon_resource_.GetFilePath(); diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h index 2766eb7..e8a77dd 100644 --- a/chrome/browser/extensions/extension_function.h +++ b/chrome/browser/extensions/extension_function.h @@ -33,6 +33,7 @@ class Profile; class ExtensionFunction : public base::RefCounted<ExtensionFunction> { public: ExtensionFunction() : request_id_(-1), name_(""), has_callback_(false) {} + virtual ~ExtensionFunction() {} // Specifies the name of the function. void set_name(const std::string& name) { name_ = name; } @@ -68,10 +69,6 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> { virtual void Run() = 0; protected: - friend class base::RefCounted<ExtensionFunction>; - - virtual ~ExtensionFunction() {} - // Gets the extension that called this function. This can return NULL for // async functions. Extension* GetExtension() { @@ -94,6 +91,7 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> { // of this call. bool has_callback_; + private: DISALLOW_COPY_AND_ASSIGN(ExtensionFunction); }; @@ -106,6 +104,7 @@ class ExtensionFunction : public base::RefCounted<ExtensionFunction> { class AsyncExtensionFunction : public ExtensionFunction { public: AsyncExtensionFunction() : args_(NULL), bad_message_(false) {} + virtual ~AsyncExtensionFunction() {} virtual void SetArgs(const Value* args); virtual const std::string GetResult(); @@ -120,8 +119,6 @@ class AsyncExtensionFunction : public ExtensionFunction { virtual bool RunImpl() = 0; protected: - virtual ~AsyncExtensionFunction() {} - void SendResponse(bool success); // Note: After Run() returns, dispatcher() can be NULL. Since these getters @@ -144,6 +141,7 @@ class AsyncExtensionFunction : public ExtensionFunction { // returning. The calling renderer process will be killed. bool bad_message_; + private: DISALLOW_COPY_AND_ASSIGN(AsyncExtensionFunction); }; @@ -166,9 +164,6 @@ class SyncExtensionFunction : public AsyncExtensionFunction { SendResponse(RunImpl()); } - protected: - virtual ~SyncExtensionFunction() {} - private: DISALLOW_COPY_AND_ASSIGN(SyncExtensionFunction); }; diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h index 16a9fb3..b987e0e 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.h +++ b/chrome/browser/extensions/extension_function_dispatcher.h @@ -37,15 +37,9 @@ class ExtensionFunctionDispatcher { // The peer object allows us to notify ExtensionFunctions when we are // destroyed. - // TODO: this should use WeakPtr struct Peer : public base::RefCounted<Peer> { Peer(ExtensionFunctionDispatcher* dispatcher) : dispatcher_(dispatcher) {} ExtensionFunctionDispatcher* dispatcher_; - - private: - friend class base::RefCounted<Peer>; - - ~Peer() {} }; // Gets a list of all known extension function names. diff --git a/chrome/browser/extensions/extension_i18n_api.h b/chrome/browser/extensions/extension_i18n_api.h index 275c882..b7e0cd9 100644 --- a/chrome/browser/extensions/extension_i18n_api.h +++ b/chrome/browser/extensions/extension_i18n_api.h @@ -8,7 +8,6 @@ #include "chrome/browser/extensions/extension_function.h" class GetAcceptLanguagesFunction : public SyncExtensionFunction { - ~GetAcceptLanguagesFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("i18n.getAcceptLanguages") }; diff --git a/chrome/browser/extensions/extension_message_service.h b/chrome/browser/extensions/extension_message_service.h index 9451381..cf52b65 100644 --- a/chrome/browser/extensions/extension_message_service.h +++ b/chrome/browser/extensions/extension_message_service.h @@ -62,6 +62,7 @@ class ExtensionMessageService // --- UI thread only: explicit ExtensionMessageService(Profile* profile); + ~ExtensionMessageService(); // Notification that our owning profile is going away. void ProfileDestroyed(); @@ -127,13 +128,9 @@ class ExtensionMessageService ResourceMessageFilter* source); private: - friend class base::RefCountedThreadSafe<ExtensionMessageService>; - // A map of channel ID to its channel object. typedef std::map<int, MessageChannel*> MessageChannelMap; - ~ExtensionMessageService(); - // Allocates a pair of port ids. // NOTE: this can be called from any thread. void AllocatePortIdPair(int* port1, int* port2); diff --git a/chrome/browser/extensions/extension_page_actions_module.h b/chrome/browser/extensions/extension_page_actions_module.h index 8c0e291..42225fc 100644 --- a/chrome/browser/extensions/extension_page_actions_module.h +++ b/chrome/browser/extensions/extension_page_actions_module.h @@ -12,7 +12,6 @@ class ExtensionAction; class PageActionFunction : public SyncExtensionFunction { protected: - virtual ~PageActionFunction() {} bool SetPageActionEnabled(bool enable); bool InitCommon(int tab_id); @@ -23,55 +22,46 @@ class PageActionFunction : public SyncExtensionFunction { }; class EnablePageActionFunction : public PageActionFunction { - ~EnablePageActionFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageActions.enableForTab") }; class DisablePageActionFunction : public PageActionFunction { - ~DisablePageActionFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab") }; class PageActionShowFunction : public PageActionFunction { - ~PageActionShowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.show") }; class PageActionHideFunction : public PageActionFunction { - ~PageActionHideFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.hide") }; class PageActionSetIconFunction : public PageActionFunction { - ~PageActionSetIconFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setIcon") }; class PageActionSetTitleFunction : public PageActionFunction { - ~PageActionSetTitleFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setTitle") }; class PageActionSetBadgeBackgroundColorFunction : public PageActionFunction { - ~PageActionSetBadgeBackgroundColorFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeBackgroundColor") }; class PageActionSetBadgeTextColorFunction : public PageActionFunction { - ~PageActionSetBadgeTextColorFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeTextColor") }; class PageActionSetBadgeTextFunction : public PageActionFunction { - ~PageActionSetBadgeTextFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeText") }; diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h index 1fa7f21..05fdcf3 100644 --- a/chrome/browser/extensions/extension_tabs_module.h +++ b/chrome/browser/extensions/extension_tabs_module.h @@ -51,81 +51,66 @@ class ExtensionTabUtil { // Windows class GetWindowFunction : public SyncExtensionFunction { - ~GetWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.get") }; class GetCurrentWindowFunction : public SyncExtensionFunction { - ~GetCurrentWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.getCurrent") }; class GetLastFocusedWindowFunction : public SyncExtensionFunction { - ~GetLastFocusedWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.getLastFocused") }; class GetAllWindowsFunction : public SyncExtensionFunction { - ~GetAllWindowsFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.getAll") }; class CreateWindowFunction : public SyncExtensionFunction { - ~CreateWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.create") }; class UpdateWindowFunction : public SyncExtensionFunction { - ~UpdateWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.update") }; class RemoveWindowFunction : public SyncExtensionFunction { - ~RemoveWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("windows.remove") }; // Tabs class GetTabFunction : public SyncExtensionFunction { - ~GetTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.get") }; class GetSelectedTabFunction : public SyncExtensionFunction { - ~GetSelectedTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.getSelected") }; class GetAllTabsInWindowFunction : public SyncExtensionFunction { - ~GetAllTabsInWindowFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.getAllInWindow") }; class CreateTabFunction : public SyncExtensionFunction { - ~CreateTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.create") }; class UpdateTabFunction : public SyncExtensionFunction { - ~UpdateTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.update") }; class MoveTabFunction : public SyncExtensionFunction { - ~MoveTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.move") }; class RemoveTabFunction : public SyncExtensionFunction { - ~RemoveTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.remove") }; class DetectTabLanguageFunction : public AsyncExtensionFunction, public NotificationObserver { private: - ~DetectTabLanguageFunction() {} virtual bool RunImpl(); virtual void Observe(NotificationType type, @@ -135,7 +120,6 @@ class DetectTabLanguageFunction : public AsyncExtensionFunction, DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage") }; class CaptureVisibleTabFunction : public SyncExtensionFunction { - ~CaptureVisibleTabFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab") }; diff --git a/chrome/browser/extensions/extension_test_api.h b/chrome/browser/extensions/extension_test_api.h index 79adf13..6ab6857 100644 --- a/chrome/browser/extensions/extension_test_api.h +++ b/chrome/browser/extensions/extension_test_api.h @@ -8,21 +8,19 @@ #include "chrome/browser/extensions/extension_function.h" class ExtensionTestPassFunction : public SyncExtensionFunction { - ~ExtensionTestPassFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("test.notifyPass") }; class ExtensionTestFailFunction : public SyncExtensionFunction { - ~ExtensionTestFailFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("test.notifyFail") }; class ExtensionTestLogFunction : public SyncExtensionFunction { - ~ExtensionTestLogFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("test.log") }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TEST_API_H_ + diff --git a/chrome/browser/extensions/extension_toolstrip_api.h b/chrome/browser/extensions/extension_toolstrip_api.h index cd4c5e0..6f648bb 100644 --- a/chrome/browser/extensions/extension_toolstrip_api.h +++ b/chrome/browser/extensions/extension_toolstrip_api.h @@ -17,7 +17,6 @@ namespace extension_toolstrip_api_events { class ToolstripFunction : public SyncExtensionFunction { protected: - virtual ~ToolstripFunction() {} virtual bool RunImpl(); ExtensionShelfModel* model_; @@ -25,13 +24,11 @@ class ToolstripFunction : public SyncExtensionFunction { }; class ToolstripExpandFunction : public ToolstripFunction { - ~ToolstripExpandFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("toolstrip.expand") }; class ToolstripCollapseFunction : public ToolstripFunction { - ~ToolstripCollapseFunction() {} virtual bool RunImpl(); DECLARE_EXTENSION_FUNCTION_NAME("toolstrip.collapse") }; diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 7cf0e4d..a546b23 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -95,11 +95,6 @@ class ExtensionUpdaterFileHandler LOG(WARNING) << "Failed to delete temp file " << path.value(); } } - - private: - friend class base::RefCountedThreadSafe<ExtensionUpdaterFileHandler>; - - ~ExtensionUpdaterFileHandler() {} }; diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h index 84a5a0e..ed6ab2c 100644 --- a/chrome/browser/extensions/extension_updater.h +++ b/chrome/browser/extensions/extension_updater.h @@ -44,6 +44,8 @@ class ExtensionUpdater PrefService* prefs, int frequency_seconds); + virtual ~ExtensionUpdater(); + // Starts the updater running. void Start(); @@ -61,12 +63,10 @@ class ExtensionUpdater } private: - friend class base::RefCountedThreadSafe<ExtensionUpdater>; friend class ExtensionUpdaterTest; friend class ExtensionUpdaterFileHandler; friend class SafeManifestParser; - virtual ~ExtensionUpdater(); // We need to keep track of some information associated with a url // when doing a fetch. diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h index a73263d..55e336d 100644 --- a/chrome/browser/extensions/extensions_service.h +++ b/chrome/browser/extensions/extensions_service.h @@ -83,6 +83,7 @@ class ExtensionsService PrefService* prefs, const FilePath& install_directory, bool autoupdate_enabled); + virtual ~ExtensionsService(); // Gets the list of currently installed extensions. virtual const ExtensionList* extensions() const { return &extensions_; } @@ -227,10 +228,6 @@ class ExtensionsService virtual std::vector<FilePath> GetTransientBlacklistPaths(); private: - friend class base::RefCountedThreadSafe<ExtensionsService>; - - virtual ~ExtensionsService(); - // Look up an extension by ID, optionally including either or both of enabled // and disabled extensions. Extension* GetExtensionByIdInternal(const std::string& id, @@ -293,6 +290,8 @@ class ExtensionsServiceBackend // preferences. ExtensionsServiceBackend(const FilePath& install_directory); + virtual ~ExtensionsServiceBackend(); + // Loads a single extension from |path| where |path| is the top directory of // a specific extension where its manifest file lives. // Errors are reported through ExtensionErrorReporter. On success, @@ -328,10 +327,6 @@ class ExtensionsServiceBackend const FilePath& path, Extension::Location location); private: - friend class base::RefCountedThreadSafe<ExtensionsServiceBackend>; - - virtual ~ExtensionsServiceBackend(); - // Finish installing the extension in |crx_path| after it has been unpacked to // |unpacked_path|. If |expected_id| is not empty, it's verified against the // extension's manifest before installation. If |silent| is true, there will diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h index 352e42c..6023255 100644 --- a/chrome/browser/extensions/extensions_ui.h +++ b/chrome/browser/extensions/extensions_ui.h @@ -48,8 +48,6 @@ class ExtensionsUIHTMLSource : public ChromeURLDataManager::DataSource { } private: - ~ExtensionsUIHTMLSource() {} - DISALLOW_COPY_AND_ASSIGN(ExtensionsUIHTMLSource); }; diff --git a/chrome/browser/extensions/file_reader.h b/chrome/browser/extensions/file_reader.h index 7ca6309..008450e 100644 --- a/chrome/browser/extensions/file_reader.h +++ b/chrome/browser/extensions/file_reader.h @@ -29,10 +29,6 @@ class FileReader : public base::RefCountedThreadSafe<FileReader> { void Start(); private: - friend class base::RefCountedThreadSafe<FileReader>; - - ~FileReader() {} - void ReadFileOnBackgroundThread(); void RunCallback(bool success, const std::string& data); diff --git a/chrome/browser/extensions/image_loading_tracker.h b/chrome/browser/extensions/image_loading_tracker.h index 23f7b71..a56aaeb 100644 --- a/chrome/browser/extensions/image_loading_tracker.h +++ b/chrome/browser/extensions/image_loading_tracker.h @@ -37,6 +37,7 @@ class ImageLoadingTracker // get deleted until we get a response from image loading (see // ImageLoadingDone). } + ~ImageLoadingTracker() {} // If there are remaining images to be loaded, the observing object should // call this method on its destruction, so that the tracker will not attempt @@ -55,10 +56,6 @@ class ImageLoadingTracker private: class LoadImageTask; - friend class base::RefCountedThreadSafe<ImageLoadingTracker>; - - ~ImageLoadingTracker() {} - // When an image has finished loaded and scaled on the file thread, it is // posted back to this method on the original thread. This method then calls // the observer's OnImageLoaded and deletes the ImageLoadingTracker if it was diff --git a/chrome/browser/extensions/pack_extension_job.h b/chrome/browser/extensions/pack_extension_job.h index 526d16d..8a40692 100644 --- a/chrome/browser/extensions/pack_extension_job.h +++ b/chrome/browser/extensions/pack_extension_job.h @@ -34,10 +34,6 @@ class PackExtensionJob : public base::RefCountedThreadSafe<PackExtensionJob> { void ClearClient(); private: - friend class base::RefCountedThreadSafe<PackExtensionJob>; - - ~PackExtensionJob() {} - void RunOnFileThread(); void ReportSuccessOnUIThread(); void ReportFailureOnUIThread(const std::string& error); diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.h b/chrome/browser/extensions/sandboxed_extension_unpacker.h index b5f1741..91cd67f 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.h +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.h @@ -20,6 +20,9 @@ class ResourceDispatcherHost; class SandboxedExtensionUnpackerClient : public base::RefCountedThreadSafe<SandboxedExtensionUnpackerClient> { public: + virtual ~SandboxedExtensionUnpackerClient(){ + } + // temp_dir - A temporary directoy containing the results of the extension // unpacking. The client is responsible for deleting this directory. // @@ -31,11 +34,6 @@ class SandboxedExtensionUnpackerClient const FilePath& extension_root, Extension* extension) = 0; virtual void OnUnpackFailure(const std::string& error) = 0; - - protected: - friend class base::RefCountedThreadSafe<SandboxedExtensionUnpackerClient>; - - virtual ~SandboxedExtensionUnpackerClient() {} }; // SandboxedExtensionUnpacker unpacks extensions from the CRX format into a diff --git a/chrome/browser/extensions/user_script_listener.h b/chrome/browser/extensions/user_script_listener.h index 7c22b53..303e354 100644 --- a/chrome/browser/extensions/user_script_listener.h +++ b/chrome/browser/extensions/user_script_listener.h @@ -36,12 +36,8 @@ class UserScriptListener bool ShouldStartRequest(URLRequest* request); private: - friend class base::RefCountedThreadSafe<UserScriptListener>; - typedef std::list<URLPattern> URLPatterns; - ~UserScriptListener() {} - // Resume any requests that we delayed in order to wait for user scripts. void StartDelayedRequests(); diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index e36a05f..980c3c9 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc @@ -42,9 +42,6 @@ class MockUserScriptMaster : public UserScriptMaster { void TestStartScan() { UserScriptMaster::StartScan(); } - - private: - ~MockUserScriptMaster() {} }; class MockIOThread : public ChromeThread { diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h index a8c3fa6..270a690 100644 --- a/chrome/browser/extensions/user_script_master.h +++ b/chrome/browser/extensions/user_script_master.h @@ -29,6 +29,7 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>, // For testability, the constructor takes the path the scripts live in. // This is normally a directory inside the profile. UserScriptMaster(const FilePath& script_dir); + virtual ~UserScriptMaster(); // Add a watched directory. All scripts will be reloaded when any file in // this directory changes. @@ -52,11 +53,6 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>, // Returns the path to the directory user scripts are stored in. FilePath user_script_dir() const { return user_script_dir_; } - protected: - friend class base::RefCountedThreadSafe<UserScriptMaster>; - - virtual ~UserScriptMaster(); - private: FRIEND_TEST(UserScriptMasterTest, Parse1); FRIEND_TEST(UserScriptMasterTest, Parse2); @@ -95,10 +91,6 @@ class UserScriptMaster : public base::RefCountedThreadSafe<UserScriptMaster>, } private: - friend class base::RefCountedThreadSafe<UserScriptMaster::ScriptReloader>; - - ~ScriptReloader() {} - // Where functions are run: // master file // StartScan -> RunScan |