From 5c78ecfe406d69ae0e90c5525761a20e6856220a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 9 Jan 2015 17:42:48 -0800 Subject: [PATCH] scoped_ptr.PassAs is removed --- atom/browser/atom_browser_context.cc | 3 +- .../extensions/global_shortcut_listener_mac.h | 8 +++--- .../extensions/global_shortcut_listener_win.h | 10 +++---- .../extensions/global_shortcut_listener_x11.h | 12 ++++---- .../chrome/browser/printing/print_job.h | 10 +++---- .../browser/printing/print_job_manager.h | 2 +- .../browser/printing/print_job_worker.cc | 4 +-- .../printing/print_view_manager_base.cc | 2 +- .../printing/print_view_manager_base.h | 10 +++---- .../printing/print_view_manager_basic.h | 6 ++-- .../chrome/browser/printing/printer_query.h | 8 +++--- .../browser/speech/tts_controller_impl.h | 28 +++++++++---------- .../chrome/browser/speech/tts_linux.cc | 14 +++++----- chromium_src/chrome/browser/speech/tts_mac.mm | 14 +++++----- chromium_src/chrome/browser/speech/tts_win.cc | 2 +- .../browser/ui/cocoa/color_chooser_mac.mm | 4 +-- .../browser/ui/views/color_chooser_aura.h | 8 +++--- .../browser/ui/views/color_chooser_dialog.h | 4 +-- .../browser/ui/views/color_chooser_win.cc | 4 +-- .../renderer/printing/print_web_view_helper.h | 4 +-- chromium_src/chrome/renderer/tts_dispatcher.h | 12 ++++---- 21 files changed, 84 insertions(+), 85 deletions(-) diff --git a/atom/browser/atom_browser_context.cc b/atom/browser/atom_browser_context.cc index f81894a5d395..7e340867ab20 100644 --- a/atom/browser/atom_browser_context.cc +++ b/atom/browser/atom_browser_context.cc @@ -68,8 +68,7 @@ net::URLRequestJobFactory* AtomBrowserContext::CreateURLRequestJobFactory( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); // Set up interceptors in the reverse order. - scoped_ptr top_job_factory = - job_factory.PassAs(); + scoped_ptr top_job_factory = job_factory.Pass(); content::URLRequestInterceptorScopedVector::reverse_iterator it; for (it = interceptors->rbegin(); it != interceptors->rend(); ++it) top_job_factory.reset(new net::URLRequestInterceptingJobFactory( diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h b/chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h index 5295a7195654..c38cb1dc5289 100644 --- a/chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h +++ b/chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h @@ -41,12 +41,12 @@ class GlobalShortcutListenerMac : public GlobalShortcutListener { bool OnMediaOrVolumeKeyEvent(int key_code); // GlobalShortcutListener implementation. - virtual void StartListening() OVERRIDE; - virtual void StopListening() OVERRIDE; + virtual void StartListening() override; + virtual void StopListening() override; virtual bool RegisterAcceleratorImpl( - const ui::Accelerator& accelerator) OVERRIDE; + const ui::Accelerator& accelerator) override; virtual void UnregisterAcceleratorImpl( - const ui::Accelerator& accelerator) OVERRIDE; + const ui::Accelerator& accelerator) override; // Mac-specific functions for registering hot keys with modifiers. bool RegisterHotKey(const ui::Accelerator& accelerator, KeyId hot_key_id); diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h b/chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h index a19207340e95..a155d8f8991f 100644 --- a/chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h +++ b/chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h @@ -26,15 +26,15 @@ class GlobalShortcutListenerWin : public GlobalShortcutListener, virtual void OnWndProc(HWND hwnd, UINT message, WPARAM wparam, - LPARAM lparam) OVERRIDE; + LPARAM lparam) override; // GlobalShortcutListener implementation. - virtual void StartListening() OVERRIDE; - virtual void StopListening() OVERRIDE; + virtual void StartListening() override; + virtual void StopListening() override; virtual bool RegisterAcceleratorImpl( - const ui::Accelerator& accelerator) OVERRIDE; + const ui::Accelerator& accelerator) override; virtual void UnregisterAcceleratorImpl( - const ui::Accelerator& accelerator) OVERRIDE; + const ui::Accelerator& accelerator) override; // Whether this object is listening for global shortcuts. bool is_listening_; diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h b/chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h index cc21ccb7454e..8d551993841d 100644 --- a/chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h +++ b/chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h @@ -23,17 +23,17 @@ class GlobalShortcutListenerX11 : public GlobalShortcutListener, virtual ~GlobalShortcutListenerX11(); // ui::PlatformEventDispatcher implementation. - virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; - virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; + virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override; + virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override; private: // GlobalShortcutListener implementation. - virtual void StartListening() OVERRIDE; - virtual void StopListening() OVERRIDE; + virtual void StartListening() override; + virtual void StopListening() override; virtual bool RegisterAcceleratorImpl( - const ui::Accelerator& accelerator) OVERRIDE; + const ui::Accelerator& accelerator) override; virtual void UnregisterAcceleratorImpl( - const ui::Accelerator& accelerator) OVERRIDE; + const ui::Accelerator& accelerator) override; // Invoked when a global shortcut is pressed. void OnXKeyPressEvent(::XEvent* x_event); diff --git a/chromium_src/chrome/browser/printing/print_job.h b/chromium_src/chrome/browser/printing/print_job.h index 1b816085c6a4..a0f844a27c2d 100644 --- a/chromium_src/chrome/browser/printing/print_job.h +++ b/chromium_src/chrome/browser/printing/print_job.h @@ -51,14 +51,14 @@ class PrintJob : public PrintJobWorkerOwner, // content::NotificationObserver implementation. virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + const content::NotificationDetails& details) override; // PrintJobWorkerOwner implementation. virtual void GetSettingsDone(const PrintSettings& new_settings, - PrintingContext::Result result) OVERRIDE; - virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) OVERRIDE; - virtual const PrintSettings& settings() const OVERRIDE; - virtual int cookie() const OVERRIDE; + PrintingContext::Result result) override; + virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override; + virtual const PrintSettings& settings() const override; + virtual int cookie() const override; // Starts the actual printing. Signals the worker that it should begin to // spool as soon as data is available. diff --git a/chromium_src/chrome/browser/printing/print_job_manager.h b/chromium_src/chrome/browser/printing/print_job_manager.h index ef61541a2ee5..32d5b301b20d 100644 --- a/chromium_src/chrome/browser/printing/print_job_manager.h +++ b/chromium_src/chrome/browser/printing/print_job_manager.h @@ -66,7 +66,7 @@ class PrintJobManager : public content::NotificationObserver { // content::NotificationObserver virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + const content::NotificationDetails& details) override; // Returns queries queue. Never returns NULL. Must be called on Browser UI // Thread. Reference could be stored and used from any thread. diff --git a/chromium_src/chrome/browser/printing/print_job_worker.cc b/chromium_src/chrome/browser/printing/print_job_worker.cc index c4794f815416..37e61413584e 100644 --- a/chromium_src/chrome/browser/printing/print_job_worker.cc +++ b/chromium_src/chrome/browser/printing/print_job_worker.cc @@ -40,8 +40,8 @@ class PrintingContextDelegate : public PrintingContext::Delegate { PrintingContextDelegate(int render_process_id, int render_view_id); virtual ~PrintingContextDelegate(); - virtual gfx::NativeView GetParentView() OVERRIDE; - virtual std::string GetAppLocale() OVERRIDE; + virtual gfx::NativeView GetParentView() override; + virtual std::string GetAppLocale() override; private: int render_process_id_; diff --git a/chromium_src/chrome/browser/printing/print_view_manager_base.cc b/chromium_src/chrome/browser/printing/print_view_manager_base.cc index e2cfedd4a2c2..af55132bd6b6 100644 --- a/chromium_src/chrome/browser/printing/print_view_manager_base.cc +++ b/chromium_src/chrome/browser/printing/print_view_manager_base.cc @@ -144,7 +144,7 @@ void PrintViewManagerBase::OnDidPrintPage( #if !defined(OS_WIN) // Update the rendered document. It will send notifications to the listener. document->SetPage(params.page_number, - metafile.PassAs(), + metafile.Pass(), params.page_size, params.content_area); diff --git a/chromium_src/chrome/browser/printing/print_view_manager_base.h b/chromium_src/chrome/browser/printing/print_view_manager_base.h index f9232fdfe87f..0d44248bfe29 100644 --- a/chromium_src/chrome/browser/printing/print_view_manager_base.h +++ b/chromium_src/chrome/browser/printing/print_view_manager_base.h @@ -43,7 +43,7 @@ class PrintViewManagerBase : public content::NotificationObserver, #endif // !DISABLE_BASIC_PRINTING // PrintedPagesSource implementation. - virtual base::string16 RenderSourceName() OVERRIDE; + virtual base::string16 RenderSourceName() override; protected: explicit PrintViewManagerBase(content::WebContents* web_contents); @@ -52,10 +52,10 @@ class PrintViewManagerBase : public content::NotificationObserver, bool PrintNowInternal(IPC::Message* message); // Terminates or cancels the print job if one was pending. - virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; + virtual void RenderProcessGone(base::TerminationStatus status) override; // content::WebContentsObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + virtual bool OnMessageReceived(const IPC::Message& message) override; // IPC Message handlers. virtual void OnPrintingFailed(int cookie); @@ -64,10 +64,10 @@ class PrintViewManagerBase : public content::NotificationObserver, // content::NotificationObserver implementation. virtual void Observe(int type, const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + const content::NotificationDetails& details) override; // Cancels the print job. - virtual void NavigationStopped() OVERRIDE; + virtual void NavigationStopped() override; // IPC Message handlers. void OnDidGetPrintedPagesCount(int cookie, int number_pages); diff --git a/chromium_src/chrome/browser/printing/print_view_manager_basic.h b/chromium_src/chrome/browser/printing/print_view_manager_basic.h index 0e403844566c..553c555cc3a6 100644 --- a/chromium_src/chrome/browser/printing/print_view_manager_basic.h +++ b/chromium_src/chrome/browser/printing/print_view_manager_basic.h @@ -32,10 +32,10 @@ class PrintViewManagerBasic // content::WebContentsObserver implementation. // Terminates or cancels the print job if one was pending. - virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; + virtual void RenderProcessGone(base::TerminationStatus status) override; // content::WebContentsObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + virtual bool OnMessageReceived(const IPC::Message& message) override; #endif private: @@ -43,7 +43,7 @@ class PrintViewManagerBasic friend class content::WebContentsUserData; #if defined(OS_ANDROID) - virtual void OnPrintingFailed(int cookie) OVERRIDE; + virtual void OnPrintingFailed(int cookie) override; // The file descriptor into which the PDF of the page will be written. base::FileDescriptor file_descriptor_; diff --git a/chromium_src/chrome/browser/printing/printer_query.h b/chromium_src/chrome/browser/printing/printer_query.h index 22af08d7af2f..9fd9a82b33ea 100644 --- a/chromium_src/chrome/browser/printing/printer_query.h +++ b/chromium_src/chrome/browser/printing/printer_query.h @@ -33,10 +33,10 @@ class PrinterQuery : public PrintJobWorkerOwner { // PrintJobWorkerOwner implementation. virtual void GetSettingsDone(const PrintSettings& new_settings, - PrintingContext::Result result) OVERRIDE; - virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) OVERRIDE; - virtual const PrintSettings& settings() const OVERRIDE; - virtual int cookie() const OVERRIDE; + PrintingContext::Result result) override; + virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override; + virtual const PrintSettings& settings() const override; + virtual int cookie() const override; // Initializes the printing context. It is fine to call this function multiple // times to reinitialize the settings. |web_contents_observer| can be queried diff --git a/chromium_src/chrome/browser/speech/tts_controller_impl.h b/chromium_src/chrome/browser/speech/tts_controller_impl.h index f6ddf584cc2e..651f836cdf6c 100644 --- a/chromium_src/chrome/browser/speech/tts_controller_impl.h +++ b/chromium_src/chrome/browser/speech/tts_controller_impl.h @@ -29,26 +29,26 @@ class TtsControllerImpl : public TtsController { static TtsControllerImpl* GetInstance(); // TtsController methods - virtual bool IsSpeaking() OVERRIDE; - virtual void SpeakOrEnqueue(Utterance* utterance) OVERRIDE; - virtual void Stop() OVERRIDE; - virtual void Pause() OVERRIDE; - virtual void Resume() OVERRIDE; + virtual bool IsSpeaking() override; + virtual void SpeakOrEnqueue(Utterance* utterance) override; + virtual void Stop() override; + virtual void Pause() override; + virtual void Resume() override; virtual void OnTtsEvent(int utterance_id, TtsEventType event_type, int char_index, - const std::string& error_message) OVERRIDE; + const std::string& error_message) override; virtual void GetVoices(content::BrowserContext* browser_context, - std::vector* out_voices) OVERRIDE; - virtual void VoicesChanged() OVERRIDE; + std::vector* out_voices) override; + virtual void VoicesChanged() override; virtual void AddVoicesChangedDelegate( - VoicesChangedDelegate* delegate) OVERRIDE; + VoicesChangedDelegate* delegate) override; virtual void RemoveVoicesChangedDelegate( - VoicesChangedDelegate* delegate) OVERRIDE; - virtual void SetTtsEngineDelegate(TtsEngineDelegate* delegate) OVERRIDE; - virtual TtsEngineDelegate* GetTtsEngineDelegate() OVERRIDE; - virtual void SetPlatformImpl(TtsPlatformImpl* platform_impl) OVERRIDE; - virtual int QueueSize() OVERRIDE; + VoicesChangedDelegate* delegate) override; + virtual void SetTtsEngineDelegate(TtsEngineDelegate* delegate) override; + virtual TtsEngineDelegate* GetTtsEngineDelegate() override; + virtual void SetPlatformImpl(TtsPlatformImpl* platform_impl) override; + virtual int QueueSize() override; protected: TtsControllerImpl(); diff --git a/chromium_src/chrome/browser/speech/tts_linux.cc b/chromium_src/chrome/browser/speech/tts_linux.cc index 15e503c3de20..43b28a5eade7 100644 --- a/chromium_src/chrome/browser/speech/tts_linux.cc +++ b/chromium_src/chrome/browser/speech/tts_linux.cc @@ -32,18 +32,18 @@ struct SPDChromeVoice { class TtsPlatformImplLinux : public TtsPlatformImpl { public: - virtual bool PlatformImplAvailable() OVERRIDE; + virtual bool PlatformImplAvailable() override; virtual bool Speak( int utterance_id, const std::string& utterance, const std::string& lang, const VoiceData& voice, - const UtteranceContinuousParameters& params) OVERRIDE; - virtual bool StopSpeaking() OVERRIDE; - virtual void Pause() OVERRIDE; - virtual void Resume() OVERRIDE; - virtual bool IsSpeaking() OVERRIDE; - virtual void GetVoices(std::vector* out_voices) OVERRIDE; + const UtteranceContinuousParameters& params) override; + virtual bool StopSpeaking() override; + virtual void Pause() override; + virtual void Resume() override; + virtual bool IsSpeaking() override; + virtual void GetVoices(std::vector* out_voices) override; void OnSpeechEvent(SPDNotificationType type); diff --git a/chromium_src/chrome/browser/speech/tts_mac.mm b/chromium_src/chrome/browser/speech/tts_mac.mm index 08786fe1e31d..acfa5b58bf3b 100644 --- a/chromium_src/chrome/browser/speech/tts_mac.mm +++ b/chromium_src/chrome/browser/speech/tts_mac.mm @@ -49,7 +49,7 @@ class TtsPlatformImplMac; class TtsPlatformImplMac : public TtsPlatformImpl { public: - virtual bool PlatformImplAvailable() OVERRIDE { + virtual bool PlatformImplAvailable() override { return true; } @@ -58,17 +58,17 @@ class TtsPlatformImplMac : public TtsPlatformImpl { const std::string& utterance, const std::string& lang, const VoiceData& voice, - const UtteranceContinuousParameters& params) OVERRIDE; + const UtteranceContinuousParameters& params) override; - virtual bool StopSpeaking() OVERRIDE; + virtual bool StopSpeaking() override; - virtual void Pause() OVERRIDE; + virtual void Pause() override; - virtual void Resume() OVERRIDE; + virtual void Resume() override; - virtual bool IsSpeaking() OVERRIDE; + virtual bool IsSpeaking() override; - virtual void GetVoices(std::vector* out_voices) OVERRIDE; + virtual void GetVoices(std::vector* out_voices) override; // Called by ChromeTtsDelegate when we get a callback from the // native speech engine. diff --git a/chromium_src/chrome/browser/speech/tts_win.cc b/chromium_src/chrome/browser/speech/tts_win.cc index 9b9ce2584c06..c7b0a0ca724c 100644 --- a/chromium_src/chrome/browser/speech/tts_win.cc +++ b/chromium_src/chrome/browser/speech/tts_win.cc @@ -34,7 +34,7 @@ class TtsPlatformImplWin : public TtsPlatformImpl { virtual bool IsSpeaking(); - virtual void GetVoices(std::vector* out_voices) OVERRIDE; + virtual void GetVoices(std::vector* out_voices) override; // Get the single instance of this class. static TtsPlatformImplWin* GetInstance(); diff --git a/chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm b/chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm index f2ce552bfcc3..cb366022d6e5 100644 --- a/chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm +++ b/chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm @@ -45,8 +45,8 @@ class ColorChooserMac : public content::ColorChooser { void DidChooseColorInColorPanel(SkColor color); void DidCloseColorPabel(); - virtual void End() OVERRIDE; - virtual void SetSelectedColor(SkColor color) OVERRIDE; + virtual void End() override; + virtual void SetSelectedColor(SkColor color) override; private: static ColorChooserMac* current_color_chooser_; diff --git a/chromium_src/chrome/browser/ui/views/color_chooser_aura.h b/chromium_src/chrome/browser/ui/views/color_chooser_aura.h index cb33d6a3983e..6394b973a3de 100644 --- a/chromium_src/chrome/browser/ui/views/color_chooser_aura.h +++ b/chromium_src/chrome/browser/ui/views/color_chooser_aura.h @@ -31,12 +31,12 @@ class ColorChooserAura : public content::ColorChooser, ColorChooserAura(content::WebContents* web_contents, SkColor initial_color); // content::ColorChooser overrides: - virtual void End() OVERRIDE; - virtual void SetSelectedColor(SkColor color) OVERRIDE; + virtual void End() override; + virtual void SetSelectedColor(SkColor color) override; // views::ColorChooserListener overrides: - virtual void OnColorChosen(SkColor color) OVERRIDE; - virtual void OnColorChooserDialogClosed() OVERRIDE; + virtual void OnColorChosen(SkColor color) override; + virtual void OnColorChooserDialogClosed() override; void DidEndColorChooser(); diff --git a/chromium_src/chrome/browser/ui/views/color_chooser_dialog.h b/chromium_src/chrome/browser/ui/views/color_chooser_dialog.h index 8f2e6ffc8faa..b23061a386dc 100644 --- a/chromium_src/chrome/browser/ui/views/color_chooser_dialog.h +++ b/chromium_src/chrome/browser/ui/views/color_chooser_dialog.h @@ -26,8 +26,8 @@ class ColorChooserDialog virtual ~ColorChooserDialog(); // BaseShellDialog: - virtual bool IsRunning(gfx::NativeWindow owning_window) const OVERRIDE; - virtual void ListenerDestroyed() OVERRIDE; + virtual bool IsRunning(gfx::NativeWindow owning_window) const override; + virtual void ListenerDestroyed() override; private: struct ExecuteOpenParams { diff --git a/chromium_src/chrome/browser/ui/views/color_chooser_win.cc b/chromium_src/chrome/browser/ui/views/color_chooser_win.cc index 1a2aed45c385..b62801399e88 100644 --- a/chromium_src/chrome/browser/ui/views/color_chooser_win.cc +++ b/chromium_src/chrome/browser/ui/views/color_chooser_win.cc @@ -24,8 +24,8 @@ class ColorChooserWin : public content::ColorChooser, ~ColorChooserWin(); // content::ColorChooser overrides: - virtual void End() OVERRIDE; - virtual void SetSelectedColor(SkColor color) OVERRIDE {} + virtual void End() override; + virtual void SetSelectedColor(SkColor color) override {} // views::ColorChooserListener overrides: virtual void OnColorChosen(SkColor color); diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper.h b/chromium_src/chrome/renderer/printing/print_web_view_helper.h index 17b8cb05b628..25ba2f668a7a 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper.h +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper.h @@ -79,9 +79,9 @@ class PrintWebViewHelper }; // RenderViewObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + virtual bool OnMessageReceived(const IPC::Message& message) override; virtual void PrintPage(blink::WebLocalFrame* frame, - bool user_initiated) OVERRIDE; + bool user_initiated) override; // Message handlers --------------------------------------------------------- #if !defined(DISABLE_BASIC_PRINTING) diff --git a/chromium_src/chrome/renderer/tts_dispatcher.h b/chromium_src/chrome/renderer/tts_dispatcher.h index 0b9bb1af00ed..fd18acba2062 100644 --- a/chromium_src/chrome/renderer/tts_dispatcher.h +++ b/chromium_src/chrome/renderer/tts_dispatcher.h @@ -37,15 +37,15 @@ class TtsDispatcher virtual ~TtsDispatcher(); // RenderProcessObserver override. - virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; + virtual bool OnControlMessageReceived(const IPC::Message& message) override; // blink::WebSpeechSynthesizer implementation. - virtual void updateVoiceList() OVERRIDE; + virtual void updateVoiceList() override; virtual void speak(const blink::WebSpeechSynthesisUtterance& utterance) - OVERRIDE; - virtual void pause() OVERRIDE; - virtual void resume() OVERRIDE; - virtual void cancel() OVERRIDE; + override; + virtual void pause() override; + virtual void resume() override; + virtual void cancel() override; blink::WebSpeechSynthesisUtterance FindUtterance(int utterance_id);