diff options
-rw-r--r-- | app/app_base.gypi | 1 | ||||
-rw-r--r-- | chrome/browser/download/download_safe_browsing_client.cc | 2 | ||||
-rw-r--r-- | chrome/browser/download/download_safe_browsing_client.h | 3 | ||||
-rw-r--r-- | chrome/browser/service/service_process_control.cc | 2 | ||||
-rw-r--r-- | chrome/browser/service/service_process_control.h | 3 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/location_bar/page_action_decoration.h | 9 | ||||
-rw-r--r-- | chrome/common/service_process_util_posix.cc | 9 | ||||
-rw-r--r-- | chrome/common/service_process_util_posix.h | 16 | ||||
-rw-r--r-- | ui/base/models/accelerator_cocoa.h | 29 | ||||
-rw-r--r-- | ui/base/models/accelerator_cocoa.mm | 37 | ||||
-rw-r--r-- | ui/gfx/transform_skia.cc | 2 | ||||
-rw-r--r-- | ui/gfx/transform_skia.h | 2 |
12 files changed, 76 insertions, 39 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi index 4faa4c5..163045f 100644 --- a/app/app_base.gypi +++ b/app/app_base.gypi @@ -163,6 +163,7 @@ '../ui/base/message_box_win.h', '../ui/base/models/accelerator.h', '../ui/base/models/accelerator_gtk.h', + '../ui/base/models/accelerator_cocoa.mm', '../ui/base/models/accelerator_cocoa.h', '../ui/base/models/button_menu_item_model.cc', '../ui/base/models/button_menu_item_model.h', diff --git a/chrome/browser/download/download_safe_browsing_client.cc b/chrome/browser/download/download_safe_browsing_client.cc index 34b7352..3873c2c 100644 --- a/chrome/browser/download/download_safe_browsing_client.cc +++ b/chrome/browser/download/download_safe_browsing_client.cc @@ -64,6 +64,8 @@ void DownloadSBClient::OnDownloadUrlCheckResult( Release(); } +DownloadSBClient::~DownloadSBClient() {} + void DownloadSBClient::SafeBrowsingCheckUrlDone( SafeBrowsingService::UrlCheckResult result) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/download/download_safe_browsing_client.h b/chrome/browser/download/download_safe_browsing_client.h index fd50e9f..ef1b1a8 100644 --- a/chrome/browser/download/download_safe_browsing_client.h +++ b/chrome/browser/download/download_safe_browsing_client.h @@ -58,6 +58,9 @@ class DownloadSBClient DOWNLOAD_URL_CHECKS_MAX }; + friend class base::RefCountedThreadSafe<DownloadSBClient>; + virtual ~DownloadSBClient(); + // Call DownloadManager on UI thread. void SafeBrowsingCheckUrlDone(SafeBrowsingService::UrlCheckResult result); diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc index a769d26..6866d30 100644 --- a/chrome/browser/service/service_process_control.cc +++ b/chrome/browser/service/service_process_control.cc @@ -296,6 +296,8 @@ void ServiceProcessControl::Launcher::Run(Task* task) { NewRunnableMethod(this, &Launcher::DoRun)); } +ServiceProcessControl::Launcher::~Launcher() {} + void ServiceProcessControl::Launcher::Notify() { DCHECK(notify_task_.get()); notify_task_->Run(); diff --git a/chrome/browser/service/service_process_control.h b/chrome/browser/service/service_process_control.h index d5e43e0..dfb5a5b 100644 --- a/chrome/browser/service/service_process_control.h +++ b/chrome/browser/service/service_process_control.h @@ -142,6 +142,9 @@ class ServiceProcessControl : public IPC::Channel::Sender, bool launched() const { return launched_; } private: + friend class base::RefCountedThreadSafe<ServiceProcessControl::Launcher>; + virtual ~Launcher(); + #if !defined(OS_MACOSX) void DoDetectLaunched(); #endif // !OS_MACOSX diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h index 4d16a69..13d2cd1 100644 --- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h +++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h @@ -57,15 +57,6 @@ class PageActionDecoration : public ImageDecoration, virtual NSString* GetToolTip(); virtual NSMenu* GetMenu(); - protected: - // For unit testing only. - PageActionDecoration() : owner_(NULL), - profile_(NULL), - page_action_(NULL), - tracker_(this), - current_tab_id_(-1), - preview_enabled_(false) {} - private: // Overridden from NotificationObserver: virtual void Observe(NotificationType type, diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc index 88c6db3..189fd7f 100644 --- a/chrome/common/service_process_util_posix.cc +++ b/chrome/common/service_process_util_posix.cc @@ -11,6 +11,11 @@ namespace { int g_signal_socket = -1; } +ServiceProcessShutdownMonitor::ServiceProcessShutdownMonitor( + Task* shutdown_task) + : shutdown_task_(shutdown_task) { +} + ServiceProcessShutdownMonitor::~ServiceProcessShutdownMonitor() { } @@ -47,6 +52,8 @@ static void SigTermHandler(int sig, siginfo_t* info, void* uap) { } } +ServiceProcessState::StateData::StateData() {} + void ServiceProcessState::StateData::SignalReady() { CHECK(MessageLoopForIO::current()->WatchFileDescriptor( sockets_[0], true, MessageLoopForIO::WATCH_READ, @@ -72,6 +79,8 @@ void ServiceProcessState::StateData::SignalReady() { } } +ServiceProcessState::StateData::~StateData() {} + bool ServiceProcessState::InitializeState() { CHECK(!state_); state_ = new StateData; diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h index b4b3359..42b0a31 100644 --- a/chrome/common/service_process_util_posix.h +++ b/chrome/common/service_process_util_posix.h @@ -37,9 +37,7 @@ class ServiceProcessShutdownMonitor kShutDownMessage = 0xdecea5e }; - explicit ServiceProcessShutdownMonitor(Task* shutdown_task) - : shutdown_task_(shutdown_task) { - } + explicit ServiceProcessShutdownMonitor(Task* shutdown_task); virtual ~ServiceProcessShutdownMonitor(); // base::MessagePumpLibevent::Watcher overrides @@ -52,6 +50,12 @@ class ServiceProcessShutdownMonitor struct ServiceProcessState::StateData : public base::RefCountedThreadSafe<ServiceProcessState::StateData> { + StateData(); + + // WatchFileDescriptor needs to be set up by the thread that is going + // to be monitoring it. + void SignalReady(); + #if defined(OS_MACOSX) base::mac::ScopedCFTypeRef<CFDictionaryRef> launchd_conf_; #endif // OS_MACOSX @@ -65,9 +69,9 @@ struct ServiceProcessState::StateData struct sigaction old_action_; bool set_action_; - // WatchFileDescriptor needs to be set up by the thread that is going - // to be monitoring it. - void SignalReady(); + protected: + friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; + virtual ~StateData(); }; #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ diff --git a/ui/base/models/accelerator_cocoa.h b/ui/base/models/accelerator_cocoa.h index 7c3db16..994cb18 100644 --- a/ui/base/models/accelerator_cocoa.h +++ b/ui/base/models/accelerator_cocoa.h @@ -19,31 +19,14 @@ namespace ui { // |-copy| to the |key_code| paramater in the constructor. class AcceleratorCocoa : public Accelerator { public: - AcceleratorCocoa(NSString* key_code, NSUInteger mask) - : Accelerator(ui::VKEY_UNKNOWN, mask), - characters_([key_code copy]) { - } - - AcceleratorCocoa(const AcceleratorCocoa& accelerator) - : Accelerator(accelerator) { - characters_.reset([accelerator.characters_ copy]); - } + AcceleratorCocoa(); + AcceleratorCocoa(NSString* key_code, NSUInteger mask); + AcceleratorCocoa(const AcceleratorCocoa& accelerator); + virtual ~AcceleratorCocoa(); - AcceleratorCocoa() : Accelerator() {} - virtual ~AcceleratorCocoa() {} + AcceleratorCocoa& operator=(const AcceleratorCocoa& accelerator); - AcceleratorCocoa& operator=(const AcceleratorCocoa& accelerator) { - if (this != &accelerator) { - *static_cast<Accelerator*>(this) = accelerator; - characters_.reset([accelerator.characters_ copy]); - } - return *this; - } - - bool operator==(const AcceleratorCocoa& rhs) const { - return [characters_ isEqualToString:rhs.characters_.get()] && - (modifiers_ == rhs.modifiers_); - } + bool operator==(const AcceleratorCocoa& rhs) const; NSString* characters() const { return characters_.get(); diff --git a/ui/base/models/accelerator_cocoa.mm b/ui/base/models/accelerator_cocoa.mm new file mode 100644 index 0000000..946adb8 --- /dev/null +++ b/ui/base/models/accelerator_cocoa.mm @@ -0,0 +1,37 @@ +// Copyright (c) 2011 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. + +#include "ui/base/models/accelerator_cocoa.h" + +namespace ui { + +AcceleratorCocoa::AcceleratorCocoa() : Accelerator() {} + +AcceleratorCocoa::AcceleratorCocoa(NSString* key_code, NSUInteger mask) + : Accelerator(ui::VKEY_UNKNOWN, mask), + characters_([key_code copy]) { +} + +AcceleratorCocoa::AcceleratorCocoa(const AcceleratorCocoa& accelerator) + : Accelerator(accelerator) { + characters_.reset([accelerator.characters_ copy]); +} + +AcceleratorCocoa::~AcceleratorCocoa() {} + +AcceleratorCocoa& AcceleratorCocoa::operator=( + const AcceleratorCocoa& accelerator) { + if (this != &accelerator) { + *static_cast<Accelerator*>(this) = accelerator; + characters_.reset([accelerator.characters_ copy]); + } + return *this; +} + +bool AcceleratorCocoa::operator==(const AcceleratorCocoa& rhs) const { + return [characters_ isEqualToString:rhs.characters_.get()] && + (modifiers_ == rhs.modifiers_); +} + +} // namespace ui diff --git a/ui/gfx/transform_skia.cc b/ui/gfx/transform_skia.cc index 50a7dcd..5d33ec8 100644 --- a/ui/gfx/transform_skia.cc +++ b/ui/gfx/transform_skia.cc @@ -22,6 +22,8 @@ TransformSkia::TransformSkia() { matrix_->reset(); } +TransformSkia::~TransformSkia() {} + void TransformSkia::SetRotate(float degree) { matrix_->setRotate(SkFloatToScalar(degree)); } diff --git a/ui/gfx/transform_skia.h b/ui/gfx/transform_skia.h index 1bd8188..83f58c5 100644 --- a/ui/gfx/transform_skia.h +++ b/ui/gfx/transform_skia.h @@ -23,7 +23,7 @@ namespace ui { class TransformSkia : public Transform { public: TransformSkia(); - virtual ~TransformSkia() {} + virtual ~TransformSkia(); // Overridden from ui::Transform virtual void SetRotate(float degree) OVERRIDE; |