summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-25 19:59:41 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-25 19:59:41 +0000
commit886d3721640dd202ac15c4944e4686bd1cf7f16d (patch)
treef7837588365e131342619d68b3934924c70d0f7a
parente59f00ea94e2642034881cd3d94d9ac1afa02df8 (diff)
downloadchromium_src-886d3721640dd202ac15c4944e4686bd1cf7f16d.zip
chromium_src-886d3721640dd202ac15c4944e4686bd1cf7f16d.tar.gz
chromium_src-886d3721640dd202ac15c4944e4686bd1cf7f16d.tar.bz2
RefCounted types should not have public destructors, chromeos edition
BUG=123295 TEST=none Review URL: https://chromiumcodereview.appspot.com/10386206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143987 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/desktop_background/desktop_background_controller.cc4
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.h3
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_handler_api.cc58
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_handler_api.h6
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_notifications.cc3
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.cc8
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.h230
-rw-r--r--chrome/browser/chromeos/extensions/file_handler_util.h3
-rw-r--r--chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc10
-rw-r--r--chrome/browser/chromeos/gdata/gdata_file_system_proxy.h4
-rw-r--r--chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc7
-rw-r--r--chrome/browser/chromeos/gdata/gdata_protocol_handler.cc14
-rw-r--r--chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc3
-rw-r--r--chrome/browser/chromeos/locale_change_guard.cc3
-rw-r--r--chrome/browser/chromeos/login/authenticator.cc3
-rw-r--r--chrome/browser/chromeos/login/authenticator.h5
-rw-r--r--chrome/browser/chromeos/login/help_app_launcher.cc7
-rw-r--r--chrome/browser/chromeos/login/help_app_launcher.h5
-rw-r--r--chrome/browser/chromeos/login/login_utils.cc4
-rw-r--r--chrome/browser/chromeos/login/mock_authenticator.h3
-rw-r--r--chrome/browser/chromeos/login/owner_manager.cc6
-rw-r--r--chrome/browser/chromeos/login/owner_manager.h8
-rw-r--r--chrome/browser/chromeos/login/parallel_authenticator.cc4
-rw-r--r--chrome/browser/chromeos/login/parallel_authenticator.h4
-rw-r--r--chrome/browser/chromeos/login/signed_settings.cc94
-rw-r--r--chrome/browser/chromeos/login/signed_settings.h4
-rw-r--r--chrome/browser/chromeos/low_memory_observer.cc9
-rw-r--r--chrome/browser/chromeos/media/media_player_extension_api.h24
-rw-r--r--chrome/browser/chromeos/mobile/mobile_activator.cc22
-rw-r--r--chrome/browser/chromeos/mobile/mobile_activator.h4
-rw-r--r--chrome/browser/chromeos/notifications/system_notification.cc2
-rw-r--r--chrome/browser/chromeos/notifications/system_notification.h3
-rw-r--r--chrome/browser/chromeos/web_socket_proxy.cc2
-rw-r--r--chrome/browser/extensions/api/terminal/terminal_private_api.cc6
-rw-r--r--chrome/browser/extensions/api/terminal/terminal_private_api.h6
-rw-r--r--chrome/browser/policy/app_pack_updater.cc4
-rw-r--r--chrome/browser/ui/views/extensions/extension_dialog.h7
-rw-r--r--chrome/browser/ui/webui/about_ui.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc7
-rw-r--r--chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc4
-rw-r--r--content/browser/renderer_host/image_transport_client.h3
-rw-r--r--content/browser/renderer_host/image_transport_client_linux.cc95
-rw-r--r--content/browser/renderer_host/image_transport_factory.cc4
-rw-r--r--ui/app_list/app_list_item_view.cc1
-rw-r--r--ui/aura/bench/bench_main.cc2
-rw-r--r--ui/aura/root_window.h6
-rw-r--r--webkit/chromeos/fileapi/remote_file_system_proxy.h6
47 files changed, 434 insertions, 290 deletions
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 6461c97..022ca0b 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -52,7 +52,7 @@ struct DesktopBackgroundController::WallpaperData {
// loading.
class DesktopBackgroundController::WallpaperOperation
: public base::RefCountedThreadSafe<
- DesktopBackgroundController::WallpaperOperation> {
+ DesktopBackgroundController::WallpaperOperation> {
public:
explicit WallpaperOperation(int index) : index_(index) {
}
@@ -79,6 +79,8 @@ class DesktopBackgroundController::WallpaperOperation
friend class base::RefCountedThreadSafe<
DesktopBackgroundController::WallpaperOperation>;
+ ~WallpaperOperation() {}
+
base::CancellationFlag cancel_flag_;
scoped_ptr<WallpaperData> wallpaper_data_;
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index d6a2c37..6fd9cd2 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -92,6 +92,9 @@ class FileBrowserEventRouter
public:
explicit FileWatcherDelegate(FileBrowserEventRouter* router);
+ protected:
+ virtual ~FileWatcherDelegate() {}
+
private:
// base::files::FilePathWatcher::Delegate overrides.
virtual void OnFilePathChanged(const FilePath& path) OVERRIDE;
diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
index 0bd0ee5..bafb685 100644
--- a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
@@ -179,6 +179,35 @@ void RelayOpenFileSystemCallbackToFileThread(
FileHandlerSelectFileFunction::FileHandlerSelectFileFunction() {}
+void FileHandlerSelectFileFunction::OnFilePathSelected(
+ bool success,
+ const FilePath& full_path) {
+ if (!success) {
+ Respond(false, std::string(), GURL(), FilePath());
+ return;
+ }
+
+ full_path_ = full_path;
+
+ BrowserContext::GetFileSystemContext(profile_)->OpenFileSystem(
+ source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
+ base::Bind(&RelayOpenFileSystemCallbackToFileThread,
+ base::Bind(&FileHandlerSelectFileFunction::CreateFileOnFileThread,
+ this)));
+};
+
+// static
+void FileHandlerSelectFileFunction::set_file_selector_for_test(
+ FileSelector* file_selector) {
+ FileHandlerSelectFileFunction::file_selector_for_test_ = file_selector;
+}
+
+// static
+void FileHandlerSelectFileFunction::set_gesture_check_disabled_for_test(
+ bool disabled) {
+ FileHandlerSelectFileFunction::gesture_check_disabled_for_test_ = disabled;
+}
+
FileHandlerSelectFileFunction::~FileHandlerSelectFileFunction() {}
bool FileHandlerSelectFileFunction::RunImpl() {
@@ -198,35 +227,6 @@ bool FileHandlerSelectFileFunction::RunImpl() {
return true;
}
-// static
-void FileHandlerSelectFileFunction::set_file_selector_for_test(
- FileSelector* file_selector) {
- FileHandlerSelectFileFunction::file_selector_for_test_ = file_selector;
-}
-
-// static
-void FileHandlerSelectFileFunction::set_gesture_check_disabled_for_test(
- bool disabled) {
- FileHandlerSelectFileFunction::gesture_check_disabled_for_test_ = disabled;
-}
-
-void FileHandlerSelectFileFunction::OnFilePathSelected(
- bool success,
- const FilePath& full_path) {
- if (!success) {
- Respond(false, std::string(), GURL(), FilePath());
- return;
- }
-
- full_path_ = full_path;
-
- BrowserContext::GetFileSystemContext(profile_)->OpenFileSystem(
- source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
- base::Bind(&RelayOpenFileSystemCallbackToFileThread,
- base::Bind(&FileHandlerSelectFileFunction::CreateFileOnFileThread,
- this)));
-};
-
void FileHandlerSelectFileFunction::CreateFileOnFileThread(
bool success,
const std::string& file_system_name,
diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api.h b/chrome/browser/chromeos/extensions/file_browser_handler_api.h
index 407811c..f9a1562 100644
--- a/chrome/browser/chromeos/extensions/file_browser_handler_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_handler_api.h
@@ -32,8 +32,9 @@ class FileSelector {
class FileHandlerSelectFileFunction : public AsyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserHandlerInternal.selectFile");
+
FileHandlerSelectFileFunction();
- virtual ~FileHandlerSelectFileFunction() OVERRIDE;
// Called by FileSelector implementation when the user selects new file's
// file path.
@@ -47,6 +48,7 @@ class FileHandlerSelectFileFunction : public AsyncExtensionFunction {
static void set_gesture_check_disabled_for_test(bool disabled);
protected:
+ virtual ~FileHandlerSelectFileFunction() OVERRIDE;
virtual bool RunImpl() OVERRIDE;
private:
@@ -87,8 +89,6 @@ class FileHandlerSelectFileFunction : public AsyncExtensionFunction {
// Once set they will be used for every extension function call.
static file_handler::FileSelector* file_selector_for_test_;
static bool gesture_check_disabled_for_test_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserHandlerInternal.selectFile");
};
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_HANDLER_API_H_
diff --git a/chrome/browser/chromeos/extensions/file_browser_notifications.cc b/chrome/browser/chromeos/extensions/file_browser_notifications.cc
index 97800c0..9f75b64 100644
--- a/chrome/browser/chromeos/extensions/file_browser_notifications.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_notifications.cc
@@ -104,7 +104,6 @@ class FileBrowserNotifications::NotificationMessage {
const std::string& id)
: host_(host),
id_(id) {}
- virtual ~Delegate() {}
virtual void Display() OVERRIDE {}
virtual void Error() OVERRIDE {}
virtual void Close(bool by_user) OVERRIDE {
@@ -120,6 +119,8 @@ class FileBrowserNotifications::NotificationMessage {
}
private:
+ virtual ~Delegate() {}
+
base::WeakPtr<FileBrowserNotifications> host_;
std::string id_;
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index 2759457..92cd024 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -690,6 +690,10 @@ bool GetFileTasksFileBrowserFunction::RunImpl() {
ExecuteTasksFileBrowserFunction::ExecuteTasksFileBrowserFunction() {}
+void ExecuteTasksFileBrowserFunction::OnTaskExecuted(bool success) {
+ SendResponse(success);
+}
+
ExecuteTasksFileBrowserFunction::~ExecuteTasksFileBrowserFunction() {}
bool ExecuteTasksFileBrowserFunction::RunImpl() {
@@ -742,10 +746,6 @@ bool ExecuteTasksFileBrowserFunction::RunImpl() {
return true;
}
-void ExecuteTasksFileBrowserFunction::OnTaskExecuted(bool success) {
- SendResponse(success);
-}
-
SetDefaultTaskFileBrowserFunction::SetDefaultTaskFileBrowserFunction() {}
SetDefaultTaskFileBrowserFunction::~SetDefaultTaskFileBrowserFunction() {}
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h
index a223341..2a43e54 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h
@@ -30,7 +30,12 @@ struct SearchResultInfo;
// Implements the chrome.fileBrowserPrivate.requestLocalFileSystem method.
class RequestLocalFileSystemFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.requestLocalFileSystem");
+
protected:
+ virtual ~RequestLocalFileSystemFunction() {}
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
@@ -41,12 +46,13 @@ class RequestLocalFileSystemFunction : public AsyncExtensionFunction {
const GURL& root_path);
void RespondFailedOnUIThread(base::PlatformFileError error_code);
void RequestOnFileThread(const GURL& source_url, int child_id);
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.requestLocalFileSystem");
};
// Implements the chrome.fileBrowserPrivate.addFileWatch method.
class FileWatchBrowserFunctionBase : public AsyncExtensionFunction {
protected:
+ virtual ~FileWatchBrowserFunctionBase() {}
+
virtual bool PerformFileWatchOperation(
scoped_refptr<FileBrowserEventRouter> event_router,
const FilePath& local_path, const FilePath& virtual_path,
@@ -67,69 +73,77 @@ class FileWatchBrowserFunctionBase : public AsyncExtensionFunction {
// Implements the chrome.fileBrowserPrivate.addFileWatch method.
class AddFileWatchBrowserFunction : public FileWatchBrowserFunctionBase {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addFileWatch");
+
protected:
+ virtual ~AddFileWatchBrowserFunction() {}
+
virtual bool PerformFileWatchOperation(
scoped_refptr<FileBrowserEventRouter> event_router,
const FilePath& local_path, const FilePath& virtual_path,
const std::string& extension_id) OVERRIDE;
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addFileWatch");
};
// Implements the chrome.fileBrowserPrivate.removeFileWatch method.
class RemoveFileWatchBrowserFunction : public FileWatchBrowserFunctionBase {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeFileWatch");
+
protected:
+ virtual ~RemoveFileWatchBrowserFunction() {}
+
virtual bool PerformFileWatchOperation(
scoped_refptr<FileBrowserEventRouter> event_router,
const FilePath& local_path, const FilePath& virtual_path,
const std::string& extension_id) OVERRIDE;
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeFileWatch");
};
// Implements the chrome.fileBrowserPrivate.getFileTasks method.
class GetFileTasksFileBrowserFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTasks");
+
protected:
+ virtual ~GetFileTasksFileBrowserFunction() {}
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
private:
bool FindDriveAppTasks(const std::vector<GURL>& file_urls,
ListValue* result_list);
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTasks");
};
// Implements the chrome.fileBrowserPrivate.executeTask method.
class ExecuteTasksFileBrowserFunction : public AsyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.executeTask");
+
ExecuteTasksFileBrowserFunction();
- virtual ~ExecuteTasksFileBrowserFunction();
void OnTaskExecuted(bool success);
protected:
+ virtual ~ExecuteTasksFileBrowserFunction();
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
-
- private:
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.executeTask");
};
// Implements the chrome.fileBrowserPrivate.setDefaultTask method.
class SetDefaultTaskFileBrowserFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setDefaultTask");
+
SetDefaultTaskFileBrowserFunction();
- virtual ~SetDefaultTaskFileBrowserFunction();
protected:
+ virtual ~SetDefaultTaskFileBrowserFunction();
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setDefaultTask");
};
// Parent class for the chromium extension APIs for the file dialog.
@@ -164,9 +178,10 @@ class FileBrowserFunction
};
// Select a single file. Closes the dialog window.
-class SelectFileFunction
- : public FileBrowserFunction {
+class SelectFileFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFile");
+
SelectFileFunction() {}
protected:
@@ -179,14 +194,13 @@ class SelectFileFunction
// A callback method to handle the result of
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFile");
};
// View multiple selected files. Window stays open.
-class ViewFilesFunction
- : public FileBrowserFunction {
+class ViewFilesFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.viewFiles");
+
ViewFilesFunction();
protected:
@@ -200,14 +214,13 @@ class ViewFilesFunction
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const std::string& internal_task_id,
const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.viewFiles");
};
// Select multiple files. Closes the dialog window.
-class SelectFilesFunction
- : public FileBrowserFunction {
+class SelectFilesFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFiles");
+
SelectFilesFunction();
protected:
@@ -220,14 +233,13 @@ class SelectFilesFunction
// A callback method to handle the result of
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.selectFiles");
};
// Cancel file selection Dialog. Closes the dialog window.
-class CancelFileDialogFunction
- : public FileBrowserFunction {
+class CancelFileDialogFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelDialog");
+
CancelFileDialogFunction() {}
protected:
@@ -235,15 +247,13 @@ class CancelFileDialogFunction
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelDialog");
};
// Mount a device or a file.
-class AddMountFunction
- : public FileBrowserFunction {
+class AddMountFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount");
+
AddMountFunction();
protected:
@@ -267,14 +277,13 @@ class AddMountFunction
const FilePath::StringType& file_name,
base::PlatformFileError error,
const FilePath& file_path);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.addMount");
};
// Unmounts selected device. Expects mount point path as an argument.
-class RemoveMountFunction
- : public FileBrowserFunction {
+class RemoveMountFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount");
+
RemoveMountFunction();
protected:
@@ -287,13 +296,12 @@ class RemoveMountFunction
// A callback method to handle the result of
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.removeMount");
};
-class GetMountPointsFunction
- : public AsyncExtensionFunction {
+class GetMountPointsFunction : public AsyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getMountPoints");
+
GetMountPointsFunction();
protected:
@@ -301,15 +309,13 @@ class GetMountPointsFunction
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getMountPoints");
};
// Formats Device given its mount path.
-class FormatDeviceFunction
- : public FileBrowserFunction {
+class FormatDeviceFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.formatDevice");
+
FormatDeviceFunction();
protected:
@@ -322,13 +328,12 @@ class FormatDeviceFunction
// A callback method to handle the result of
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.formatDevice");
};
-class GetSizeStatsFunction
- : public FileBrowserFunction {
+class GetSizeStatsFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getSizeStats");
+
GetSizeStatsFunction();
protected:
@@ -346,48 +351,56 @@ class GetSizeStatsFunction
size_t total_size_kb,
size_t remaining_size_kb);
void CallGetSizeStatsOnFileThread(const std::string& mount_path);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getSizeStats");
};
// Retrieves devices meta-data. Expects volume's device path as an argument.
-class GetVolumeMetadataFunction
- : public FileBrowserFunction {
+class GetVolumeMetadataFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata");
+
GetVolumeMetadataFunction();
protected:
virtual ~GetVolumeMetadataFunction();
+ // AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
private:
// A callback method to handle the result of
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getVolumeMetadata");
};
// Toggles fullscreen mode for the browser.
class ToggleFullscreenFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.toggleFullscreen");
+
protected:
+ virtual ~ToggleFullscreenFunction() {}
+
+ // SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.toggleFullscreen");
};
// Checks if the browser is in fullscreen mode.
class IsFullscreenFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.isFullscreen");
+
protected:
+ virtual ~IsFullscreenFunction() {}
+
+ // SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.isFullscreen");
};
// File Dialog Strings.
class FileDialogStringsFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
+
FileDialogStringsFunction() {}
protected:
@@ -395,9 +408,6 @@ class FileDialogStringsFunction : public SyncExtensionFunction {
// SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
};
// Retrieve property information for multiple files, returning a list of the
@@ -406,14 +416,16 @@ class FileDialogStringsFunction : public SyncExtensionFunction {
// (base::PlatformFileError) for that entry in the returned list.
class GetGDataFilePropertiesFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFileProperties");
+
GetGDataFilePropertiesFunction();
protected:
+ virtual ~GetGDataFilePropertiesFunction();
+
void GetNextFileProperties();
void CompleteGetFileProperties();
- virtual ~GetGDataFilePropertiesFunction();
-
// Virtual function that can be overridden to do operations on each virtual
// file path and update its the properties.
virtual void DoOperation(const FilePath& file_path,
@@ -444,8 +456,6 @@ class GetGDataFilePropertiesFunction : public FileBrowserFunction {
size_t current_index_;
base::ListValue* path_list_;
scoped_ptr<base::ListValue> file_properties_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFileProperties");
};
// Pin/unpin multiple files in the cache, returning a list of file
@@ -456,6 +466,8 @@ class GetGDataFilePropertiesFunction : public FileBrowserFunction {
// returned list.
class PinGDataFileFunction : public GetGDataFilePropertiesFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinGDataFile");
+
PinGDataFileFunction();
protected:
@@ -481,8 +493,6 @@ class PinGDataFileFunction : public GetGDataFilePropertiesFunction {
// True for pin, false for unpin.
bool set_pin_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinGDataFile");
};
// Get file locations for the given list of file URLs. Returns a list of
@@ -490,6 +500,8 @@ class PinGDataFileFunction : public GetGDataFilePropertiesFunction {
// file is on gdata, and 'local' means the file is on the local drive.
class GetFileLocationsFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileLocations");
+
GetFileLocationsFunction();
protected:
@@ -502,8 +514,6 @@ class GetFileLocationsFunction : public FileBrowserFunction {
// A callback method to handle the result of
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileLocations");
};
// Get gdata files for the given list of file URLs. Initiate downloading of
@@ -516,6 +526,8 @@ class GetFileLocationsFunction : public FileBrowserFunction {
// TODO(satorux): Should we propagate error types to the JavasScript layer?
class GetGDataFilesFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFiles");
+
GetGDataFilesFunction();
protected:
@@ -542,48 +554,51 @@ class GetGDataFilesFunction : public FileBrowserFunction {
std::queue<FilePath> remaining_gdata_paths_;
ListValue* local_paths_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFiles");
};
// Implements the chrome.fileBrowserPrivate.executeTask method.
class GetFileTransfersFunction : public AsyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTransfers");
+
GetFileTransfersFunction();
- virtual ~GetFileTransfersFunction();
protected:
+ virtual ~GetFileTransfersFunction();
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
private:
ListValue* GetFileTransfersList();
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTransfers");
};
// Implements the chrome.fileBrowserPrivate.cancelFileTransfers method.
class CancelFileTransfersFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelFileTransfers");
+
CancelFileTransfersFunction();
- virtual ~CancelFileTransfersFunction();
protected:
+ virtual ~CancelFileTransfersFunction();
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.cancelFileTransfers");
};
// Implements the chrome.fileBrowserPrivate.transferFile method.
class TransferFileFunction : public FileBrowserFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.transferFile");
+
TransferFileFunction();
- virtual ~TransferFileFunction();
protected:
+ virtual ~TransferFileFunction();
+
// AsyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
@@ -594,41 +609,52 @@ class TransferFileFunction : public FileBrowserFunction {
// Helper callback for handling response from GDataFileSystem::TransferFile().
void OnTransferCompleted(base::PlatformFileError error);
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.transferFile");
};
// Read setting value.
class GetGDataPreferencesFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataPreferences");
+
protected:
+ virtual ~GetGDataPreferencesFunction() {}
+
virtual bool RunImpl() OVERRIDE;
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataPreferences");
};
// Write setting value.
class SetGDataPreferencesFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setGDataPreferences");
+
protected:
+ virtual ~SetGDataPreferencesFunction() {}
+
virtual bool RunImpl() OVERRIDE;
- private:
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setGDataPreferences");
};
class GetPathForDriveSearchResultFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME(
+ "fileBrowserPrivate.getPathForDriveSearchResult");
+
protected:
+ virtual ~GetPathForDriveSearchResultFunction() {}
+
virtual bool RunImpl() OVERRIDE;
void OnEntryFound(base::PlatformFileError error,
const FilePath& entry_path,
scoped_ptr<gdata::GDataEntryProto> entry_proto);
-
- private:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "fileBrowserPrivate.getPathForDriveSearchResult");
};
class SearchDriveFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.searchGData");
+
protected:
+ virtual ~SearchDriveFunction() {}
+
virtual bool RunImpl() OVERRIDE;
private:
@@ -646,26 +672,30 @@ class SearchDriveFunction : public AsyncExtensionFunction {
// to represent search results.
std::string file_system_name_;
GURL file_system_url_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.searchGData");
};
// Implements the chrome.fileBrowserPrivate.getNetworkConnectionState method.
class GetNetworkConnectionStateFunction : public SyncExtensionFunction {
- protected:
- virtual bool RunImpl() OVERRIDE;
- private:
+ public:
DECLARE_EXTENSION_FUNCTION_NAME(
"fileBrowserPrivate.getNetworkConnectionState");
+
+ protected:
+ virtual ~GetNetworkConnectionStateFunction() {}
+
+ virtual bool RunImpl() OVERRIDE;
};
// Implements the chrome.fileBrowserPrivate.requestDirectoryRefresh method.
class RequestDirectoryRefreshFunction : public SyncExtensionFunction {
- protected:
- virtual bool RunImpl() OVERRIDE;
- private:
+ public:
DECLARE_EXTENSION_FUNCTION_NAME(
"fileBrowserPrivate.requestDirectoryRefresh");
+
+ protected:
+ virtual ~RequestDirectoryRefreshFunction() {}
+
+ virtual bool RunImpl() OVERRIDE;
};
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
diff --git a/chrome/browser/chromeos/extensions/file_handler_util.h b/chrome/browser/chromeos/extensions/file_handler_util.h
index 28614d0..e4f3c05 100644
--- a/chrome/browser/chromeos/extensions/file_handler_util.h
+++ b/chrome/browser/chromeos/extensions/file_handler_util.h
@@ -82,7 +82,6 @@ class FileTaskExecutor : public base::RefCountedThreadSafe<FileTaskExecutor> {
const GURL source_url,
const std::string& extension_id,
const std::string& action_id);
- virtual ~FileTaskExecutor();
// Same as ExecuteAndNotify, but no notification is performed.
virtual bool Execute(const std::vector<GURL>& file_urls);
@@ -98,6 +97,7 @@ class FileTaskExecutor : public base::RefCountedThreadSafe<FileTaskExecutor> {
protected:
explicit FileTaskExecutor(Profile* profile);
+ virtual ~FileTaskExecutor();
// Returns the profile that this task was created with.
Profile* profile() { return profile_; }
@@ -105,6 +105,7 @@ class FileTaskExecutor : public base::RefCountedThreadSafe<FileTaskExecutor> {
// Returns a browser to use for the current browser.
Browser* GetBrowser() const;
private:
+ friend class base::RefCountedThreadSafe<FileTaskExecutor>;
Profile* profile_;
};
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
index 5d72c16..7efcb59 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
@@ -177,11 +177,6 @@ GDataFileSystemProxy::GDataFileSystemProxy(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-GDataFileSystemProxy::~GDataFileSystemProxy() {
- // Should be deleted from the CrosMountPointProvider on IO thread.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
-}
-
void GDataFileSystemProxy::GetFileInfo(const GURL& file_url,
const FileSystemOperationInterface::GetMetadataCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -463,6 +458,11 @@ void GDataFileSystemProxy::CreateWritableSnapshotFile(
callback));
}
+GDataFileSystemProxy::~GDataFileSystemProxy() {
+ // Should be deleted from the CrosMountPointProvider on IO thread.
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+}
+
// static.
bool GDataFileSystemProxy::ValidateUrl(const GURL& url, FilePath* file_path) {
// what platform you're on.
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
index 39b1008..34036df 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
@@ -23,7 +23,6 @@ class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
// |profile| is used to create GDataFileSystem, which is a per-profile
// instance.
explicit GDataFileSystemProxy(GDataFileSystemInterface* file_system);
- virtual ~GDataFileSystemProxy();
// fileapi::RemoteFileSystemProxyInterface overrides.
virtual void GetFileInfo(const GURL& path,
@@ -65,6 +64,9 @@ class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
callback) OVERRIDE;
// TODO(zelidrag): More methods to follow as we implement other parts of FSO.
+ protected:
+ virtual ~GDataFileSystemProxy();
+
private:
// Checks if a given |url| belongs to this file system. If it does,
// the call will return true and fill in |file_path| with a file path of
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index dcfc874..5e78bbf 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -1229,7 +1229,6 @@ class GDataFileSystemTest : public testing::Test {
quota_bytes_total_(0),
quota_bytes_used_(0),
file_proto_(NULL) {}
- virtual ~CallbackHelper() {}
virtual void GetFileCallback(base::PlatformFileError error,
const FilePath& file_path,
@@ -1300,6 +1299,12 @@ class GDataFileSystemTest : public testing::Test {
scoped_ptr<GDataEntryProto> entry_proto_;
scoped_ptr<GDataFileProto> file_proto_;
scoped_ptr<GDataDirectoryProto> directory_proto_;
+
+ protected:
+ virtual ~CallbackHelper() {}
+
+ private:
+ friend class base::RefCountedThreadSafe<CallbackHelper>;
};
MessageLoopForUI message_loop_;
diff --git a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
index a53496f..365a5ac 100644
--- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
+++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
@@ -127,7 +127,6 @@ void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) {
class GDataURLRequestJob : public net::URLRequestJob {
public:
explicit GDataURLRequestJob(net::URLRequest* request);
- virtual ~GDataURLRequestJob();
// net::URLRequestJob overrides:
virtual void Start() OVERRIDE;
@@ -139,6 +138,9 @@ class GDataURLRequestJob : public net::URLRequestJob {
int buf_size,
int* bytes_read) OVERRIDE;
+ protected:
+ virtual ~GDataURLRequestJob();
+
private:
// Helper for Start() to let us start asynchronously.
void StartAsync(GDataFileSystem** file_system);
@@ -233,10 +235,6 @@ GDataURLRequestJob::GDataURLRequestJob(net::URLRequest* request)
download_growable_buf_, download_growable_buf_->capacity());
}
-GDataURLRequestJob::~GDataURLRequestJob() {
- CloseFileStream();
-}
-
void GDataURLRequestJob::Start() {
DVLOG(1) << "Starting request";
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -461,6 +459,12 @@ bool GDataURLRequestJob::ReadRawData(net::IOBuffer* dest,
return rc;
}
+//======================= GDataURLRequestJob protected methods ================
+
+GDataURLRequestJob::~GDataURLRequestJob() {
+ CloseFileStream();
+}
+
//======================= GDataURLRequestJob private methods ===================
void GDataURLRequestJob::StartAsync(GDataFileSystem** file_system) {
diff --git a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc
index 4063852..36273d4 100644
--- a/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc
+++ b/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc
@@ -41,6 +41,9 @@ class ScreensaverUnpackerClient : public SandboxedExtensionUnpackerClient {
const Extension* extension) OVERRIDE;
void OnUnpackFailure(const string16& error) OVERRIDE;
+ protected:
+ virtual ~ScreensaverUnpackerClient() {}
+
private:
void LoadScreensaverExtension(
const FilePath& extension_base_path,
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc
index aa861e2..92815d3 100644
--- a/chrome/browser/chromeos/locale_change_guard.cc
+++ b/chrome/browser/chromeos/locale_change_guard.cc
@@ -45,6 +45,9 @@ class LocaleChangeGuard::Delegate : public NotificationDelegate {
return NULL;
}
+ protected:
+ virtual ~Delegate() {}
+
private:
chromeos::LocaleChangeGuard* master_;
diff --git a/chrome/browser/chromeos/login/authenticator.cc b/chrome/browser/chromeos/login/authenticator.cc
index 0a641d5..20de695 100644
--- a/chrome/browser/chromeos/login/authenticator.cc
+++ b/chrome/browser/chromeos/login/authenticator.cc
@@ -9,7 +9,8 @@ namespace chromeos {
class LoginStatusConsumer;
Authenticator::Authenticator(LoginStatusConsumer* consumer)
- : consumer_(consumer), authentication_profile_(NULL) {
+ : consumer_(consumer),
+ authentication_profile_(NULL) {
}
Authenticator::~Authenticator() {}
diff --git a/chrome/browser/chromeos/login/authenticator.h b/chrome/browser/chromeos/login/authenticator.h
index 88fd043..e05f162 100644
--- a/chrome/browser/chromeos/login/authenticator.h
+++ b/chrome/browser/chromeos/login/authenticator.h
@@ -26,7 +26,6 @@ namespace chromeos {
class Authenticator : public base::RefCountedThreadSafe<Authenticator> {
public:
explicit Authenticator(LoginStatusConsumer* consumer);
- virtual ~Authenticator();
// Given externally authenticated |username| and |password|, this method
// attempts to complete authentication process.
@@ -93,10 +92,14 @@ class Authenticator : public base::RefCountedThreadSafe<Authenticator> {
Profile* authentication_profile() { return authentication_profile_; }
protected:
+ virtual ~Authenticator();
+
LoginStatusConsumer* consumer_;
Profile* authentication_profile_;
private:
+ friend class base::RefCountedThreadSafe<Authenticator>;
+
DISALLOW_COPY_AND_ASSIGN(Authenticator);
};
diff --git a/chrome/browser/chromeos/login/help_app_launcher.cc b/chrome/browser/chromeos/login/help_app_launcher.cc
index 004891f..4fa56f0 100644
--- a/chrome/browser/chromeos/login/help_app_launcher.cc
+++ b/chrome/browser/chromeos/login/help_app_launcher.cc
@@ -32,8 +32,6 @@ HelpAppLauncher::HelpAppLauncher(gfx::NativeWindow parent_window)
: parent_window_(parent_window) {
}
-HelpAppLauncher::~HelpAppLauncher() {}
-
void HelpAppLauncher::ShowHelpTopic(HelpTopic help_topic_id) {
Profile* profile = ProfileManager::GetDefaultProfile();
ExtensionService* service = profile->GetExtensionService();
@@ -51,6 +49,11 @@ void HelpAppLauncher::ShowHelpTopic(HelpTopic help_topic_id) {
}
///////////////////////////////////////////////////////////////////////////////
+// HelpApp, protected:
+
+HelpAppLauncher::~HelpAppLauncher() {}
+
+///////////////////////////////////////////////////////////////////////////////
// HelpApp, private:
void HelpAppLauncher::ShowHelpTopicDialog(const GURL& topic_url) {
diff --git a/chrome/browser/chromeos/login/help_app_launcher.h b/chrome/browser/chromeos/login/help_app_launcher.h
index fddcb76..608cddf 100644
--- a/chrome/browser/chromeos/login/help_app_launcher.h
+++ b/chrome/browser/chromeos/login/help_app_launcher.h
@@ -38,7 +38,6 @@ class HelpAppLauncher : public LoginWebDialog::Delegate,
// Parent window is used to show dialog.
explicit HelpAppLauncher(gfx::NativeWindow parent_window);
- virtual ~HelpAppLauncher();
// Shows specified help topic.
void ShowHelpTopic(HelpTopic help_topic_id);
@@ -47,10 +46,14 @@ class HelpAppLauncher : public LoginWebDialog::Delegate,
bool is_open() const { return dialog_.get() && dialog_->is_open(); }
protected:
+ virtual ~HelpAppLauncher();
+
// LoginWebDialog::Delegate implementation:
virtual void OnDialogClosed() OVERRIDE {}
private:
+ friend class base::RefCountedThreadSafe<HelpAppLauncher>;
+
// Shows help topic dialog for specified GURL.
void ShowHelpTopicDialog(const GURL& topic_url);
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index cab8a9d..00ec9f1 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -197,6 +197,10 @@ class JobRestartRequest
}
private:
+ friend class base::RefCountedThreadSafe<JobRestartRequest>;
+
+ ~JobRestartRequest() {}
+
void RestartJob() {
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
DBusThreadManager::Get()->GetSessionManagerClient()->RestartJob(
diff --git a/chrome/browser/chromeos/login/mock_authenticator.h b/chrome/browser/chromeos/login/mock_authenticator.h
index d11fcf6..2a8f5c2 100644
--- a/chrome/browser/chromeos/login/mock_authenticator.h
+++ b/chrome/browser/chromeos/login/mock_authenticator.h
@@ -65,6 +65,9 @@ class MockAuthenticator : public Authenticator {
const std::string& login_token,
const std::string& login_captcha) OVERRIDE {}
+ protected:
+ virtual ~MockAuthenticator() {}
+
private:
std::string expected_username_;
std::string expected_password_;
diff --git a/chrome/browser/chromeos/login/owner_manager.cc b/chrome/browser/chromeos/login/owner_manager.cc
index 00a8009..7f9a20a 100644
--- a/chrome/browser/chromeos/login/owner_manager.cc
+++ b/chrome/browser/chromeos/login/owner_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -27,8 +27,6 @@ OwnerManager::OwnerManager()
utils_(OwnerKeyUtils::Create()) {
}
-OwnerManager::~OwnerManager() {}
-
void OwnerManager::UpdateOwnerKey(const BrowserThread::ID thread_id,
const std::vector<uint8>& key,
KeyUpdateDelegate* d) {
@@ -135,6 +133,8 @@ void OwnerManager::Verify(const BrowserThread::ID thread_id,
BootTimesLoader::Get()->AddLoginTimeMarker("VerifyEnd", false);
}
+OwnerManager::~OwnerManager() {}
+
void OwnerManager::SendNotification(
int type,
const content::NotificationDetails& details) {
diff --git a/chrome/browser/chromeos/login/owner_manager.h b/chrome/browser/chromeos/login/owner_manager.h
index 74dc6d5..c0cfbc5 100644
--- a/chrome/browser/chromeos/login/owner_manager.h
+++ b/chrome/browser/chromeos/login/owner_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -51,7 +51,6 @@ class OwnerManager : public base::RefCountedThreadSafe<OwnerManager> {
};
OwnerManager();
- virtual ~OwnerManager();
// Sets a new owner key from a provided memory buffer.
void UpdateOwnerKey(const content::BrowserThread::ID thread_id,
@@ -90,7 +89,12 @@ class OwnerManager : public base::RefCountedThreadSafe<OwnerManager> {
const std::vector<uint8>& signature,
Delegate* d);
+ protected:
+ virtual ~OwnerManager();
+
private:
+ friend class base::RefCountedThreadSafe<OwnerManager>;
+
// A helper method to send a notification on another thread.
void SendNotification(int type,
const content::NotificationDetails& details);
diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc
index d6ccdde..cb4758d 100644
--- a/chrome/browser/chromeos/login/parallel_authenticator.cc
+++ b/chrome/browser/chromeos/login/parallel_authenticator.cc
@@ -181,8 +181,6 @@ ParallelAuthenticator::ParallelAuthenticator(LoginStatusConsumer* consumer)
OwnershipService::GetSharedInstance()->StartLoadOwnerKeyAttempt();
}
-ParallelAuthenticator::~ParallelAuthenticator() {}
-
void ParallelAuthenticator::AuthenticateToLogin(
Profile* profile,
const std::string& username,
@@ -616,6 +614,8 @@ void ParallelAuthenticator::Resolve() {
}
}
+ParallelAuthenticator::~ParallelAuthenticator() {}
+
ParallelAuthenticator::AuthState ParallelAuthenticator::ResolveState() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// If we haven't mounted the user's home dir yet, we can't be done.
diff --git a/chrome/browser/chromeos/login/parallel_authenticator.h b/chrome/browser/chromeos/login/parallel_authenticator.h
index 465fa23..8410ef3 100644
--- a/chrome/browser/chromeos/login/parallel_authenticator.h
+++ b/chrome/browser/chromeos/login/parallel_authenticator.h
@@ -67,7 +67,6 @@ class ParallelAuthenticator : public Authenticator,
};
explicit ParallelAuthenticator(LoginStatusConsumer* consumer);
- virtual ~ParallelAuthenticator();
// Authenticator overrides.
virtual void CompleteLogin(Profile* profile,
@@ -145,6 +144,9 @@ class ParallelAuthenticator : public Authenticator,
void OnOffTheRecordLoginSuccess();
void OnPasswordChangeDetected();
+ protected:
+ virtual ~ParallelAuthenticator();
+
private:
friend class ParallelAuthenticatorTest;
FRIEND_TEST_ALL_PREFIXES(ParallelAuthenticatorTest,
diff --git a/chrome/browser/chromeos/login/signed_settings.cc b/chrome/browser/chromeos/login/signed_settings.cc
index 44975d7..11fd6d3 100644
--- a/chrome/browser/chromeos/login/signed_settings.cc
+++ b/chrome/browser/chromeos/login/signed_settings.cc
@@ -58,15 +58,19 @@ class StorePolicyOp : public SignedSettings {
public:
StorePolicyOp(em::PolicyFetchResponse* policy,
SignedSettings::Delegate<bool>* d);
- virtual ~StorePolicyOp();
- void Execute();
- void Fail(SignedSettings::ReturnCode code);
void Succeed(bool value);
// Implementation of OwnerManager::Delegate
- void OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
- const std::vector<uint8>& payload);
+ virtual void Execute() OVERRIDE;
+ virtual void Fail(SignedSettings::ReturnCode code) OVERRIDE;
+ virtual void OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
+ const std::vector<uint8>& payload) OVERRIDE;
+
+ protected:
+ virtual ~StorePolicyOp();
private:
+ void RequestStorePolicy();
+
void OnBoolComplete(bool success);
// Always call d_->OnSettingOpCompleted() via this call.
// It guarantees that the callback will not be triggered until _after_
@@ -76,21 +80,21 @@ class StorePolicyOp : public SignedSettings {
em::PolicyFetchResponse* policy_;
SignedSettings::Delegate<bool>* d_;
-
- void RequestStorePolicy();
};
class RetrievePolicyOp : public SignedSettings {
public:
explicit RetrievePolicyOp(
SignedSettings::Delegate<const em::PolicyFetchResponse&>* d);
- virtual ~RetrievePolicyOp();
- void Execute();
- void Fail(SignedSettings::ReturnCode code);
void Succeed(const em::PolicyFetchResponse& value);
// Implementation of OwnerManager::Delegate
- void OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
- const std::vector<uint8>& payload);
+ virtual void Execute() OVERRIDE;
+ virtual void Fail(SignedSettings::ReturnCode code) OVERRIDE;
+ virtual void OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
+ const std::vector<uint8>& payload) OVERRIDE;
+
+ protected:
+ virtual ~RetrievePolicyOp();
private:
void OnStringComplete(const std::string& serialized_proto);
@@ -130,13 +134,18 @@ StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy,
d_(d) {
}
-StorePolicyOp::~StorePolicyOp() {}
-
-void StorePolicyOp::OnBoolComplete(bool success) {
- if (success)
- Succeed(true);
- else
- Fail(NOT_FOUND);
+void StorePolicyOp::Succeed(bool ignored) {
+ SignedSettings::ReturnCode code = SUCCESS;
+ bool to_ret = true;
+ em::PolicyData poldata;
+ if (SignedSettings::PolicyIsSane(*policy_, &poldata)) {
+ } else {
+ code = NOT_FOUND;
+ to_ret = false;
+ }
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(&StorePolicyOp::PerformCallback, this, code, to_ret));
}
void StorePolicyOp::Execute() {
@@ -155,20 +164,6 @@ void StorePolicyOp::Fail(SignedSettings::ReturnCode code) {
base::Bind(&StorePolicyOp::PerformCallback, this, code, false));
}
-void StorePolicyOp::Succeed(bool ignored) {
- SignedSettings::ReturnCode code = SUCCESS;
- bool to_ret = true;
- em::PolicyData poldata;
- if (SignedSettings::PolicyIsSane(*policy_, &poldata)) {
- } else {
- code = NOT_FOUND;
- to_ret = false;
- }
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&StorePolicyOp::PerformCallback, this, code, to_ret));
-}
-
void StorePolicyOp::OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
const std::vector<uint8>& payload) {
// Ensure we're on the UI thread, due to the need to send DBus traffic.
@@ -190,6 +185,8 @@ void StorePolicyOp::OnKeyOpComplete(const OwnerManager::KeyOpCode return_code,
Fail(SignedSettings::MapKeyOpCode(return_code));
}
+StorePolicyOp::~StorePolicyOp() {}
+
void StorePolicyOp::RequestStorePolicy() {
std::string serialized;
if (policy_->SerializeToString(&serialized)) {
@@ -201,6 +198,13 @@ void StorePolicyOp::RequestStorePolicy() {
}
}
+void StorePolicyOp::OnBoolComplete(bool success) {
+ if (success)
+ Succeed(true);
+ else
+ Fail(NOT_FOUND);
+}
+
void StorePolicyOp::PerformCallback(SignedSettings::ReturnCode code,
bool value) {
d_->OnSettingsOpCompleted(code, value);
@@ -211,7 +215,16 @@ RetrievePolicyOp::RetrievePolicyOp(
: d_(d) {
}
-RetrievePolicyOp::~RetrievePolicyOp() {}
+void RetrievePolicyOp::Succeed(const em::PolicyFetchResponse& value) {
+ em::PolicyData poldata;
+ if (SignedSettings::PolicyIsSane(value, &poldata)) {
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(&RetrievePolicyOp::PerformCallback, this, SUCCESS, value));
+ } else {
+ Fail(NOT_FOUND);
+ }
+}
void RetrievePolicyOp::Execute() {
DBusThreadManager::Get()->GetSessionManagerClient()->RetrieveDevicePolicy(
@@ -226,17 +239,6 @@ void RetrievePolicyOp::Fail(SignedSettings::ReturnCode code) {
em::PolicyFetchResponse()));
}
-void RetrievePolicyOp::Succeed(const em::PolicyFetchResponse& value) {
- em::PolicyData poldata;
- if (SignedSettings::PolicyIsSane(value, &poldata)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&RetrievePolicyOp::PerformCallback, this, SUCCESS, value));
- } else {
- Fail(NOT_FOUND);
- }
-}
-
void RetrievePolicyOp::OnKeyOpComplete(
const OwnerManager::KeyOpCode return_code,
const std::vector<uint8>& payload) {
@@ -254,6 +256,8 @@ void RetrievePolicyOp::OnKeyOpComplete(
Fail(SignedSettings::MapKeyOpCode(return_code));
}
+RetrievePolicyOp::~RetrievePolicyOp() {}
+
void RetrievePolicyOp::OnStringComplete(const std::string& serialized_proto) {
ProcessPolicy(serialized_proto);
}
diff --git a/chrome/browser/chromeos/login/signed_settings.h b/chrome/browser/chromeos/login/signed_settings.h
index d9f7dd9..a160463 100644
--- a/chrome/browser/chromeos/login/signed_settings.h
+++ b/chrome/browser/chromeos/login/signed_settings.h
@@ -51,7 +51,6 @@ class SignedSettings : public base::RefCountedThreadSafe<SignedSettings>,
};
SignedSettings();
- virtual ~SignedSettings();
// These are both "policy" operations, and only one instance of
// one type can be in flight at a time.
@@ -74,6 +73,8 @@ class SignedSettings : public base::RefCountedThreadSafe<SignedSettings>,
const std::vector<uint8>& payload) = 0;
protected:
+ virtual ~SignedSettings();
+
static bool PolicyIsSane(
const enterprise_management::PolicyFetchResponse& value,
enterprise_management::PolicyData* poldata);
@@ -83,6 +84,7 @@ class SignedSettings : public base::RefCountedThreadSafe<SignedSettings>,
OwnershipService* service_;
private:
+ friend class base::RefCountedThreadSafe<SignedSettings>;
friend class SignedSettingsTest;
friend class SignedSettingsHelperTest;
diff --git a/chrome/browser/chromeos/low_memory_observer.cc b/chrome/browser/chromeos/low_memory_observer.cc
index a27602c..efcb55a 100644
--- a/chrome/browser/chromeos/low_memory_observer.cc
+++ b/chrome/browser/chromeos/low_memory_observer.cc
@@ -48,9 +48,6 @@ class LowMemoryObserverImpl
: public base::RefCountedThreadSafe<LowMemoryObserverImpl> {
public:
LowMemoryObserverImpl() : watcher_delegate_(this), file_descriptor_(-1) {}
- ~LowMemoryObserverImpl() {
- StopObservingOnFileThread();
- }
// Start watching the low memory file for readability.
// Calls to StartObserving should always be matched with calls to
@@ -63,6 +60,12 @@ class LowMemoryObserverImpl
void StopObservingOnFileThread();
private:
+ friend class base::RefCountedThreadSafe<LowMemoryObserverImpl>;
+
+ ~LowMemoryObserverImpl() {
+ StopObservingOnFileThread();
+ }
+
// Start a timer to resume watching the low memory file descriptor.
void ScheduleNextObservation();
diff --git a/chrome/browser/chromeos/media/media_player_extension_api.h b/chrome/browser/chromeos/media/media_player_extension_api.h
index 640d517..2ec9f69 100644
--- a/chrome/browser/chromeos/media/media_player_extension_api.h
+++ b/chrome/browser/chromeos/media/media_player_extension_api.h
@@ -14,34 +14,50 @@
// Implements the chrome.mediaPlayerPrivate.play method.
class PlayMediaplayerFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.play");
+
protected:
+ virtual ~PlayMediaplayerFunction() {}
+
// SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.play");
};
// Implements the chrome.mediaPlayerPrivate.getPlaylist method.
class GetPlaylistMediaplayerFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.getPlaylist");
+
protected:
+ virtual ~GetPlaylistMediaplayerFunction() {}
+
// SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.getPlaylist");
};
// Implements the chrome.mediaPlayerPrivate.setWindowHeight method.
class SetWindowHeightMediaplayerFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.setWindowHeight");
+
protected:
+ virtual ~SetWindowHeightMediaplayerFunction() {}
+
// SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.setWindowHeight");
};
// Implements the chrome.mediaPlayerPrivate.closeWindow method.
class CloseWindowMediaplayerFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.closeWindow");
+
protected:
+ virtual ~CloseWindowMediaplayerFunction() {}
+
// SyncExtensionFunction overrides.
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("mediaPlayerPrivate.closeWindow");
};
#endif // CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_EXTENSION_API_H_
diff --git a/chrome/browser/chromeos/mobile/mobile_activator.cc b/chrome/browser/chromeos/mobile/mobile_activator.cc
index aed47ab..476bd37 100644
--- a/chrome/browser/chromeos/mobile/mobile_activator.cc
+++ b/chrome/browser/chromeos/mobile/mobile_activator.cc
@@ -88,11 +88,7 @@ namespace chromeos {
// CellularConfigDocument
//
////////////////////////////////////////////////////////////////////////////////
-CellularConfigDocument::CellularConfigDocument() {
-}
-
-CellularConfigDocument::~CellularConfigDocument() {
-}
+CellularConfigDocument::CellularConfigDocument() {}
std::string CellularConfigDocument::GetErrorMessage(const std::string& code) {
base::AutoLock create(config_lock_);
@@ -117,6 +113,15 @@ void CellularConfigDocument::LoadCellularConfigFile() {
}
}
+CellularConfigDocument::~CellularConfigDocument() {}
+
+void CellularConfigDocument::SetErrorMap(
+ const ErrorMap& map) {
+ base::AutoLock create(config_lock_);
+ error_map_.clear();
+ error_map_.insert(map.begin(), map.end());
+}
+
bool CellularConfigDocument::LoadFromFile(const FilePath& config_path) {
std::string config;
if (!file_util::ReadFileToString(config_path, &config))
@@ -153,13 +158,6 @@ bool CellularConfigDocument::LoadFromFile(const FilePath& config_path) {
return true;
}
-void CellularConfigDocument::SetErrorMap(
- const ErrorMap& map) {
- base::AutoLock create(config_lock_);
- error_map_.clear();
- error_map_.insert(map.begin(), map.end());
-}
-
////////////////////////////////////////////////////////////////////////////////
//
// MobileActivator
diff --git a/chrome/browser/chromeos/mobile/mobile_activator.h b/chrome/browser/chromeos/mobile/mobile_activator.h
index cd5bc50..3b7e881 100644
--- a/chrome/browser/chromeos/mobile/mobile_activator.h
+++ b/chrome/browser/chromeos/mobile/mobile_activator.h
@@ -22,7 +22,6 @@ class CellularConfigDocument
: public base::RefCountedThreadSafe<CellularConfigDocument> {
public:
CellularConfigDocument();
- virtual ~CellularConfigDocument();
// Return error message for a given code.
std::string GetErrorMessage(const std::string& code);
@@ -30,8 +29,11 @@ class CellularConfigDocument
const std::string& version() { return version_; }
private:
+ friend class base::RefCountedThreadSafe<CellularConfigDocument>;
typedef std::map<std::string, std::string> ErrorMap;
+ virtual ~CellularConfigDocument();
+
void SetErrorMap(const ErrorMap& map);
bool LoadFromFile(const FilePath& config_path);
diff --git a/chrome/browser/chromeos/notifications/system_notification.cc b/chrome/browser/chromeos/notifications/system_notification.cc
index efaaa1d..587ce48 100644
--- a/chrome/browser/chromeos/notifications/system_notification.cc
+++ b/chrome/browser/chromeos/notifications/system_notification.cc
@@ -141,4 +141,6 @@ SystemNotification::Delegate::GetRenderViewHost() const {
return NULL;
}
+SystemNotification::Delegate::~Delegate() {}
+
} // namespace chromeos
diff --git a/chrome/browser/chromeos/notifications/system_notification.h b/chrome/browser/chromeos/notifications/system_notification.h
index 40d97de..f9d78b9 100644
--- a/chrome/browser/chromeos/notifications/system_notification.h
+++ b/chrome/browser/chromeos/notifications/system_notification.h
@@ -79,6 +79,9 @@ class SystemNotification : public PowerManagerClient::Observer {
virtual std::string id() const OVERRIDE;
virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE;
+ protected:
+ virtual ~Delegate();
+
private:
std::string id_;
diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc
index eb7ef07..28d14f1 100644
--- a/chrome/browser/chromeos/web_socket_proxy.cc
+++ b/chrome/browser/chromeos/web_socket_proxy.cc
@@ -464,11 +464,11 @@ class SSLChan : public MessageLoopForIO::Watcher {
DCHECK(host_->data());
}
+ protected:
virtual ~DerivedIOBufferWithSize() {
data_ = NULL; // We do not own memory, bypass base class destructor.
}
- protected:
scoped_refptr<net::IOBuffer> host_;
};
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.cc b/chrome/browser/extensions/api/terminal/terminal_private_api.cc
index c70cfdf..91e1483 100644
--- a/chrome/browser/extensions/api/terminal/terminal_private_api.cc
+++ b/chrome/browser/extensions/api/terminal/terminal_private_api.cc
@@ -114,6 +114,8 @@ void OpenTerminalProcessFunction::OpenOnFileThread() {
base::Bind(&OpenTerminalProcessFunction::RespondOnUIThread, this, pid));
}
+SendInputToTerminalProcessFunction::~SendInputToTerminalProcessFunction() {}
+
void OpenTerminalProcessFunction::RespondOnUIThread(pid_t pid) {
result_.reset(new base::FundamentalValue(pid));
SendResponse(true);
@@ -149,6 +151,8 @@ void SendInputToTerminalProcessFunction::RespondOnUIThread(bool success) {
SendResponse(true);
}
+CloseTerminalProcessFunction::~CloseTerminalProcessFunction() {}
+
bool CloseTerminalProcessFunction::RunTerminalFunction() {
if (args_->GetSize() != 1)
return false;
@@ -176,6 +180,8 @@ void CloseTerminalProcessFunction::RespondOnUIThread(bool success) {
SendResponse(true);
}
+OnTerminalResizeFunction::~OnTerminalResizeFunction() {}
+
bool OnTerminalResizeFunction::RunTerminalFunction() {
if (args_->GetSize() != 3)
return false;
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.h b/chrome/browser/extensions/api/terminal/terminal_private_api.h
index 9bb4b26..ae66932 100644
--- a/chrome/browser/extensions/api/terminal/terminal_private_api.h
+++ b/chrome/browser/extensions/api/terminal/terminal_private_api.h
@@ -53,6 +53,8 @@ class SendInputToTerminalProcessFunction : public TerminalPrivateFunction {
DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.sendInput")
protected:
+ virtual ~SendInputToTerminalProcessFunction();
+
// TerminalPrivateFunction:
virtual bool RunTerminalFunction() OVERRIDE;
@@ -67,6 +69,8 @@ class CloseTerminalProcessFunction : public TerminalPrivateFunction {
DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.closeTerminalProcess")
protected:
+ virtual ~CloseTerminalProcessFunction();
+
virtual bool RunTerminalFunction() OVERRIDE;
private:
@@ -80,6 +84,8 @@ class OnTerminalResizeFunction : public TerminalPrivateFunction {
DECLARE_EXTENSION_FUNCTION_NAME("terminalPrivate.onTerminalResize")
protected:
+ virtual ~OnTerminalResizeFunction();
+
virtual bool RunTerminalFunction() OVERRIDE;
private:
diff --git a/chrome/browser/policy/app_pack_updater.cc b/chrome/browser/policy/app_pack_updater.cc
index 6d32cb1..32c46b2 100644
--- a/chrome/browser/policy/app_pack_updater.cc
+++ b/chrome/browser/policy/app_pack_updater.cc
@@ -52,7 +52,6 @@ class AppPackExternalExtensionLoader
public base::SupportsWeakPtr<AppPackExternalExtensionLoader> {
public:
AppPackExternalExtensionLoader() {}
- virtual ~AppPackExternalExtensionLoader() {}
// Used by the AppPackUpdater to update the current list of extensions.
// The format of |prefs| is detailed in the ExternalExtensionLoader/Provider
@@ -70,6 +69,9 @@ class AppPackExternalExtensionLoader
LoadFinished();
}
+ protected:
+ virtual ~AppPackExternalExtensionLoader() {}
+
private:
base::DictionaryValue app_pack_prefs_;
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.h b/chrome/browser/ui/views/extensions/extension_dialog.h
index 272f270..3445eb5 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.h
+++ b/chrome/browser/ui/views/extensions/extension_dialog.h
@@ -29,8 +29,6 @@ class ExtensionDialog : public views::WidgetDelegate,
public content::NotificationObserver,
public base::RefCounted<ExtensionDialog> {
public:
- virtual ~ExtensionDialog();
-
// Create and show a dialog with |url| centered over the browser window.
// |browser| is the browser to which the pop-up will be attached.
// |web_contents| is the tab that spawned the dialog.
@@ -92,7 +90,12 @@ class ExtensionDialog : public views::WidgetDelegate,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ protected:
+ virtual ~ExtensionDialog();
+
private:
+ friend class base::RefCounted<ExtensionDialog>;
+
// Use Show() to create instances.
ExtensionDialog(ExtensionHost* host, ExtensionDialogObserver* observer);
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc
index b1a3e38..856aca4 100644
--- a/chrome/browser/ui/webui/about_ui.cc
+++ b/chrome/browser/ui/webui/about_ui.cc
@@ -193,6 +193,8 @@ class ChromeOSTermsHandler
}
private:
+ friend class base::RefCountedThreadSafe<ChromeOSTermsHandler>;
+
ChromeOSTermsHandler(AboutUIHTMLSource* source,
const std::string& path,
int request_id)
@@ -202,6 +204,8 @@ class ChromeOSTermsHandler
locale_(chromeos::WizardController::GetInitialLocale()) {
}
+ ~ChromeOSTermsHandler() {}
+
void StartOnUIThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
BrowserThread::PostTask(
diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
index ebd296b..ceb6756 100644
--- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
@@ -36,11 +36,14 @@ class ProxySettingsHTMLSource : public ChromeURLDataManager::DataSource {
// the path we registered.
virtual void StartDataRequest(const std::string& path,
bool is_incognito,
- int request_id);
- virtual std::string GetMimeType(const std::string&) const {
+ int request_id) OVERRIDE;
+ virtual std::string GetMimeType(const std::string&) const OVERRIDE {
return "text/html";
}
+ protected:
+ virtual ~ProxySettingsHTMLSource() {}
+
private:
scoped_ptr<DictionaryValue> localized_strings_;
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index ea7825e..a5be6bd 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -170,6 +170,10 @@ class SimUnlockHandler : public WebUIMessageHandler,
}
private:
+ friend class base::RefCountedThreadSafe<TaskProxy>;
+
+ ~TaskProxy() {}
+
base::WeakPtr<SimUnlockHandler> handler_;
// Pending code input (PIN/PUK).
diff --git a/content/browser/renderer_host/image_transport_client.h b/content/browser/renderer_host/image_transport_client.h
index b18ea2f..7abeb3a 100644
--- a/content/browser/renderer_host/image_transport_client.h
+++ b/content/browser/renderer_host/image_transport_client.h
@@ -21,8 +21,6 @@ class ImageTransportFactory;
// data is only valid after the first Update().
class ImageTransportClient : public ui::Texture {
public:
- virtual ~ImageTransportClient() {}
-
// Initializes the client with the surface id.
virtual bool Initialize(uint64* surface_handle) = 0;
@@ -39,6 +37,7 @@ class ImageTransportClient : public ui::Texture {
protected:
ImageTransportClient(bool flipped, const gfx::Size& size);
+ virtual ~ImageTransportClient() {}
private:
DISALLOW_COPY_AND_ASSIGN(ImageTransportClient);
diff --git a/content/browser/renderer_host/image_transport_client_linux.cc b/content/browser/renderer_host/image_transport_client_linux.cc
index a3425f2..dd6aeb9 100644
--- a/content/browser/renderer_host/image_transport_client_linux.cc
+++ b/content/browser/renderer_host/image_transport_client_linux.cc
@@ -49,17 +49,7 @@ class ImageTransportClientEGL : public ImageTransportClient {
image_(NULL) {
}
- virtual ~ImageTransportClientEGL() {
- scoped_ptr<gfx::ScopedMakeCurrent> bind(factory_->GetScopedMakeCurrent());
- if (image_)
- eglDestroyImageKHR(gfx::GLSurfaceEGL::GetHardwareDisplay(), image_);
- unsigned int texture = texture_id();
- if (texture)
- glDeleteTextures(1, &texture);
- glFlush();
- }
-
- virtual bool Initialize(uint64* surface_handle) {
+ virtual bool Initialize(uint64* surface_handle) OVERRIDE {
scoped_ptr<gfx::ScopedMakeCurrent> bind(factory_->GetScopedMakeCurrent());
image_ = eglCreateImageKHR(
gfx::GLSurfaceEGL::GetHardwareDisplay(), EGL_NO_CONTEXT,
@@ -73,11 +63,22 @@ class ImageTransportClientEGL : public ImageTransportClient {
return true;
}
- virtual void Update() { }
- virtual TransportDIB::Handle Handle() const {
+ virtual void Update() OVERRIDE {}
+ virtual TransportDIB::Handle Handle() const OVERRIDE {
return TransportDIB::DefaultHandleValue();
}
+ protected:
+ virtual ~ImageTransportClientEGL() {
+ scoped_ptr<gfx::ScopedMakeCurrent> bind(factory_->GetScopedMakeCurrent());
+ if (image_)
+ eglDestroyImageKHR(gfx::GLSurfaceEGL::GetHardwareDisplay(), image_);
+ unsigned int texture = texture_id();
+ if (texture)
+ glDeleteTextures(1, &texture);
+ glFlush();
+ }
+
private:
ImageTransportFactory* factory_;
EGLImageKHR image_;
@@ -93,23 +94,7 @@ class ImageTransportClientGLX : public ImageTransportClient {
acquired_(false) {
}
- virtual ~ImageTransportClientGLX() {
- scoped_ptr<gfx::ScopedMakeCurrent> bind(factory_->GetScopedMakeCurrent());
- Display* dpy = base::MessagePumpForUI::GetDefaultXDisplay();
- if (glx_pixmap_) {
- if (acquired_)
- glXReleaseTexImageEXT(dpy, glx_pixmap_, GLX_FRONT_LEFT_EXT);
- glXDestroyGLXPixmap(dpy, glx_pixmap_);
- }
- if (pixmap_)
- XFreePixmap(dpy, pixmap_);
- unsigned int texture = texture_id();
- if (texture)
- glDeleteTextures(1, &texture);
- glFlush();
- }
-
- virtual bool Initialize(uint64* surface_handle) {
+ virtual bool Initialize(uint64* surface_handle) OVERRIDE {
TRACE_EVENT0("renderer_host", "ImageTransportClientGLX::Initialize");
Display* dpy = base::MessagePumpForUI::GetDefaultXDisplay();
@@ -136,7 +121,7 @@ class ImageTransportClientGLX : public ImageTransportClient {
return true;
}
- virtual void Update() {
+ virtual void Update() OVERRIDE {
TRACE_EVENT0("renderer_host", "ImageTransportClientGLX::Update");
Display* dpy = base::MessagePumpForUI::GetDefaultXDisplay();
scoped_ptr<gfx::ScopedMakeCurrent> bind(factory_->GetScopedMakeCurrent());
@@ -148,10 +133,27 @@ class ImageTransportClientGLX : public ImageTransportClient {
glFlush();
}
- virtual TransportDIB::Handle Handle() const {
+ virtual TransportDIB::Handle Handle() const OVERRIDE {
return TransportDIB::DefaultHandleValue();
}
+ protected:
+ virtual ~ImageTransportClientGLX() {
+ scoped_ptr<gfx::ScopedMakeCurrent> bind(factory_->GetScopedMakeCurrent());
+ Display* dpy = base::MessagePumpForUI::GetDefaultXDisplay();
+ if (glx_pixmap_) {
+ if (acquired_)
+ glXReleaseTexImageEXT(dpy, glx_pixmap_, GLX_FRONT_LEFT_EXT);
+ glXDestroyGLXPixmap(dpy, glx_pixmap_);
+ }
+ if (pixmap_)
+ XFreePixmap(dpy, pixmap_);
+ unsigned int texture = texture_id();
+ if (texture)
+ glDeleteTextures(1, &texture);
+ glFlush();
+ }
+
private:
static bool InitializeOneOff(Display* dpy) {
static bool initialized = false;
@@ -237,17 +239,7 @@ class ImageTransportClientOSMesa : public ImageTransportClient {
factory_(factory) {
}
- virtual ~ImageTransportClientOSMesa() {
- unsigned int texture = texture_id();
- if (texture) {
- scoped_ptr<gfx::ScopedMakeCurrent> bind(
- factory_->GetScopedMakeCurrent());
- glDeleteTextures(1, &texture);
- glFlush();
- }
- }
-
- virtual bool Initialize(uint64* surface_handle) {
+ virtual bool Initialize(uint64* surface_handle) OVERRIDE {
// We expect to make the handle here, so don't want the other end giving us
// one.
DCHECK_EQ(*surface_handle, static_cast<uint64>(0));
@@ -270,7 +262,7 @@ class ImageTransportClientOSMesa : public ImageTransportClient {
return true;
}
- virtual void Update() {
+ virtual void Update() OVERRIDE {
glBindTexture(GL_TEXTURE_2D, texture_id());
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
size().width(), size().height(), 0,
@@ -278,7 +270,20 @@ class ImageTransportClientOSMesa : public ImageTransportClient {
glFlush();
}
- virtual TransportDIB::Handle Handle() const { return shared_mem_->handle(); }
+ virtual TransportDIB::Handle Handle() const OVERRIDE {
+ return shared_mem_->handle();
+ }
+
+ protected:
+ virtual ~ImageTransportClientOSMesa() {
+ unsigned int texture = texture_id();
+ if (texture) {
+ scoped_ptr<gfx::ScopedMakeCurrent> bind(
+ factory_->GetScopedMakeCurrent());
+ glDeleteTextures(1, &texture);
+ glFlush();
+ }
+ }
private:
ImageTransportFactory* factory_;
diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc
index 1b9801e..31885b9 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -122,12 +122,14 @@ class ImageTransportClientTexture : public ImageTransportClient {
return true;
}
- virtual ~ImageTransportClientTexture() {}
virtual void Update() OVERRIDE {}
virtual TransportDIB::Handle Handle() const OVERRIDE {
return TransportDIB::DefaultHandleValue();
}
+ protected:
+ virtual ~ImageTransportClientTexture() {}
+
private:
DISALLOW_COPY_AND_ASSIGN(ImageTransportClientTexture);
};
diff --git a/ui/app_list/app_list_item_view.cc b/ui/app_list/app_list_item_view.cc
index 703efea..714bf32 100644
--- a/ui/app_list/app_list_item_view.cc
+++ b/ui/app_list/app_list_item_view.cc
@@ -122,6 +122,7 @@ class AppListItemView::IconOperation
private:
friend class base::RefCountedThreadSafe<AppListItemView::IconOperation>;
+ ~IconOperation() {}
base::CancellationFlag cancel_flag_;
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index 1445f08..92a837e 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -142,11 +142,11 @@ class WebGLTexture : public ui::Texture {
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
}
+ private:
virtual ~WebGLTexture() {
context_->deleteTexture(texture_id());
}
- private:
WebGraphicsContext3D* context_;
DISALLOW_COPY_AND_ASSIGN(WebGLTexture);
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h
index 7b5a59f..a0d5811 100644
--- a/ui/aura/root_window.h
+++ b/ui/aura/root_window.h
@@ -60,13 +60,13 @@ class TouchEvent;
class AURA_EXPORT CompositorLock :
public base::RefCounted<CompositorLock>,
public base::SupportsWeakPtr<CompositorLock> {
- public:
- ~CompositorLock();
-
private:
+ friend class base::RefCounted<CompositorLock>;
friend class RootWindow;
CompositorLock(RootWindow* root_window);
+ ~CompositorLock();
+
void CancelLock();
RootWindow* root_window_;
diff --git a/webkit/chromeos/fileapi/remote_file_system_proxy.h b/webkit/chromeos/fileapi/remote_file_system_proxy.h
index 77e4a04..95f9325 100644
--- a/webkit/chromeos/fileapi/remote_file_system_proxy.h
+++ b/webkit/chromeos/fileapi/remote_file_system_proxy.h
@@ -23,8 +23,6 @@ typedef base::Callback<
class RemoteFileSystemProxyInterface :
public base::RefCountedThreadSafe<RemoteFileSystemProxyInterface> {
public:
- virtual ~RemoteFileSystemProxyInterface() {}
-
// Gets the file or directory info for given|path|.
virtual void GetFileInfo(const GURL& path,
const FileSystemOperationInterface::GetMetadataCallback& callback) = 0;
@@ -95,6 +93,10 @@ class RemoteFileSystemProxyInterface :
base::ProcessHandle peer_handle,
const FileSystemOperationInterface::OpenFileCallback& callback) = 0;
// TODO(zelidrag): More methods to follow as we implement other parts of FSO.
+
+ protected:
+ friend class base::RefCountedThreadSafe<RemoteFileSystemProxyInterface>;
+ virtual ~RemoteFileSystemProxyInterface() {}
};
} // namespace fileapi