diff options
24 files changed, 58 insertions, 67 deletions
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h index b43d305..70dd08a 100644 --- a/ppapi/proxy/host_dispatcher.h +++ b/ppapi/proxy/host_dispatcher.h @@ -10,7 +10,6 @@ #include <vector> #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "base/process.h" #include "ipc/ipc_channel_proxy.h" #include "ppapi/c/pp_instance.h" diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h index 5d344e7..5022f69 100644 --- a/ppapi/proxy/plugin_dispatcher.h +++ b/ppapi/proxy/plugin_dispatcher.h @@ -10,7 +10,6 @@ #include "base/basictypes.h" #include "base/hash_tables.h" -#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/process.h" #include "build/build_config.h" diff --git a/ppapi/proxy/serialized_flash_menu.h b/ppapi/proxy/serialized_flash_menu.h index f7ad6b6..271caba 100644 --- a/ppapi/proxy/serialized_flash_menu.h +++ b/ppapi/proxy/serialized_flash_menu.h @@ -9,7 +9,6 @@ #include <vector> #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" #include "ppapi/proxy/ppapi_proxy_export.h" class PickleIterator; diff --git a/ppapi/shared_impl/ppb_network_list_private_shared.h b/ppapi/shared_impl/ppb_network_list_private_shared.h index c15ccc3..196f386 100644 --- a/ppapi/shared_impl/ppb_network_list_private_shared.h +++ b/ppapi/shared_impl/ppb_network_list_private_shared.h @@ -5,10 +5,11 @@ #ifndef PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_ #define PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_ +#include <string> #include <vector> #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" +#include "base/memory/ref_counted.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_network_list_private_api.h" @@ -33,7 +34,7 @@ typedef std::vector<NetworkInfo> NetworkList; class PPAPI_SHARED_EXPORT NetworkListStorage : public base::RefCountedThreadSafe<NetworkListStorage> { public: - NetworkListStorage(const NetworkList& list); + explicit NetworkListStorage(const NetworkList& list); const NetworkList& list() { return list_; } diff --git a/ppapi/shared_impl/ppb_url_request_info_shared.h b/ppapi/shared_impl/ppb_url_request_info_shared.h index 7876d23..dbad103 100644 --- a/ppapi/shared_impl/ppb_url_request_info_shared.h +++ b/ppapi/shared_impl/ppb_url_request_info_shared.h @@ -32,7 +32,7 @@ struct PPAPI_SHARED_EXPORT PPB_URLRequestInfo_Data { // may still be NULL in some cases, such as deserialization errors. // // This is a bit tricky. In the plugin side of the proxy, both the file ref - // and the file_ref_host_resource will be set and valid. The scoped_ptr + // and the file_ref_host_resource will be set and valid. The scoped_refptr // ensures that the resource is alive for as long as the BodyItem is. // // When we deserialize this in the renderer, only the diff --git a/ppapi/shared_impl/private/ppb_host_resolver_shared.cc b/ppapi/shared_impl/private/ppb_host_resolver_shared.cc index 9a145a9..581055d 100644 --- a/ppapi/shared_impl/private/ppb_host_resolver_shared.cc +++ b/ppapi/shared_impl/private/ppb_host_resolver_shared.cc @@ -7,6 +7,7 @@ #include <cstddef> #include <cstring> +#include "base/memory/scoped_ptr.h" #include "net/base/address_list.h" #include "ppapi/c/pp_errors.h" #include "ppapi/shared_impl/private/net_address_private_impl.h" diff --git a/ppapi/shared_impl/private/ppb_host_resolver_shared.h b/ppapi/shared_impl/private/ppb_host_resolver_shared.h index 7a5404f..d915946 100644 --- a/ppapi/shared_impl/private/ppb_host_resolver_shared.h +++ b/ppapi/shared_impl/private/ppb_host_resolver_shared.h @@ -10,7 +10,6 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/shared_impl/tracked_callback.h" #include "ppapi/thunk/ppb_host_resolver_private_api.h" diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h index d8084d7..77f707c 100644 --- a/ppapi/shared_impl/var.h +++ b/ppapi/shared_impl/var.h @@ -9,7 +9,6 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "ppapi/c/pp_var.h" #include "ppapi/shared_impl/ppapi_shared_export.h" @@ -92,7 +91,7 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> { // DoSomethingWithTheString(string->value()); class PPAPI_SHARED_EXPORT StringVar : public Var { public: - StringVar(const std::string& str); + explicit StringVar(const std::string& str); StringVar(const char* str, uint32 len); virtual ~StringVar(); diff --git a/printing/backend/win_helper.cc b/printing/backend/win_helper.cc index 9166c96..5980291 100644 --- a/printing/backend/win_helper.cc +++ b/printing/backend/win_helper.cc @@ -9,52 +9,53 @@ #include "base/file_path.h" #include "base/file_version_info.h" #include "base/logging.h" +#include "base/memory/scoped_ptr.h" #include "base/utf_string_conversions.h" #include "printing/backend/print_backend.h" #include "printing/backend/print_backend_consts.h" namespace { -typedef HRESULT (WINAPI *PTOpenProviderProc)(PCWSTR printer_name, +typedef HRESULT (WINAPI* PTOpenProviderProc)(PCWSTR printer_name, DWORD version, - HPTPROVIDER *provider); -typedef HRESULT (WINAPI *PTGetPrintCapabilitiesProc)(HPTPROVIDER provider, - IStream *print_ticket, - IStream *capabilities, + HPTPROVIDER* provider); +typedef HRESULT (WINAPI* PTGetPrintCapabilitiesProc)(HPTPROVIDER provider, + IStream* print_ticket, + IStream* capabilities, BSTR* error_message); -typedef HRESULT (WINAPI *PTConvertDevModeToPrintTicketProc)( +typedef HRESULT (WINAPI* PTConvertDevModeToPrintTicketProc)( HPTPROVIDER provider, ULONG devmode_size_in_bytes, PDEVMODE devmode, EPrintTicketScope scope, IStream* print_ticket); -typedef HRESULT (WINAPI *PTConvertPrintTicketToDevModeProc)( +typedef HRESULT (WINAPI* PTConvertPrintTicketToDevModeProc)( HPTPROVIDER provider, IStream* print_ticket, EDefaultDevmodeType base_devmode_type, EPrintTicketScope scope, ULONG* devmode_byte_count, - PDEVMODE *devmode, + PDEVMODE* devmode, BSTR* error_message); -typedef HRESULT (WINAPI *PTMergeAndValidatePrintTicketProc)( +typedef HRESULT (WINAPI* PTMergeAndValidatePrintTicketProc)( HPTPROVIDER provider, IStream* base_ticket, IStream* delta_ticket, EPrintTicketScope scope, IStream* result_ticket, BSTR* error_message); -typedef HRESULT (WINAPI *PTReleaseMemoryProc)(PVOID buffer); -typedef HRESULT (WINAPI *PTCloseProviderProc)(HPTPROVIDER provider); -typedef HRESULT (WINAPI *StartXpsPrintJobProc)( +typedef HRESULT (WINAPI* PTReleaseMemoryProc)(PVOID buffer); +typedef HRESULT (WINAPI* PTCloseProviderProc)(HPTPROVIDER provider); +typedef HRESULT (WINAPI* StartXpsPrintJobProc)( const LPCWSTR printer_name, const LPCWSTR job_name, const LPCWSTR output_file_name, HANDLE progress_event, HANDLE completion_event, - UINT8 *printable_pages_on, + UINT8* printable_pages_on, UINT32 printable_pages_on_count, - IXpsPrintJob **xps_print_job, - IXpsPrintJobStream **document_stream, - IXpsPrintJobStream **print_ticket_stream); + IXpsPrintJob** xps_print_job, + IXpsPrintJobStream** document_stream, + IXpsPrintJobStream** print_ticket_stream); PTOpenProviderProc g_open_provider_proc = NULL; PTGetPrintCapabilitiesProc g_get_print_capabilities_proc = NULL; @@ -107,7 +108,7 @@ const DRIVER_INFO_6* GetDriverInfo6(HANDLE printer, return reinterpret_cast<const DRIVER_INFO_6*>(buffer->get()); } -} +} // namespace namespace printing { @@ -172,13 +173,13 @@ bool XPSModule::InitImpl() { HRESULT XPSModule::OpenProvider(const string16& printer_name, DWORD version, - HPTPROVIDER *provider) { + HPTPROVIDER* provider) { return g_open_provider_proc(printer_name.c_str(), version, provider); } HRESULT XPSModule::GetPrintCapabilities(HPTPROVIDER provider, - IStream *print_ticket, - IStream *capabilities, + IStream* print_ticket, + IStream* capabilities, BSTR* error_message) { return g_get_print_capabilities_proc(provider, print_ticket, @@ -204,7 +205,7 @@ HRESULT XPSModule::ConvertPrintTicketToDevMode( EDefaultDevmodeType base_devmode_type, EPrintTicketScope scope, ULONG* devmode_byte_count, - PDEVMODE *devmode, + PDEVMODE* devmode, BSTR* error_message) { return g_convert_print_ticket_to_devmode_proc(provider, print_ticket, @@ -293,11 +294,11 @@ HRESULT XPSPrintModule::StartXpsPrintJob( const LPCWSTR output_file_name, HANDLE progress_event, HANDLE completion_event, - UINT8 *printable_pages_on, + UINT8* printable_pages_on, UINT32 printable_pages_on_count, - IXpsPrintJob **xps_print_job, - IXpsPrintJobStream **document_stream, - IXpsPrintJobStream **print_ticket_stream) { + IXpsPrintJob** xps_print_job, + IXpsPrintJobStream** document_stream, + IXpsPrintJobStream** print_ticket_stream) { return g_start_xps_print_job_proc(printer_name, job_name, output_file_name, diff --git a/printing/backend/win_helper.h b/printing/backend/win_helper.h index 7c35cbe..87cae3c 100644 --- a/printing/backend/win_helper.h +++ b/printing/backend/win_helper.h @@ -13,7 +13,6 @@ #include <string> -#include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "base/win/scoped_handle.h" #include "printing/printing_export.h" @@ -58,10 +57,10 @@ class PRINTING_EXPORT XPSModule { static bool Init(); static HRESULT OpenProvider(const string16& printer_name, DWORD version, - HPTPROVIDER *provider); + HPTPROVIDER* provider); static HRESULT GetPrintCapabilities(HPTPROVIDER provider, - IStream *print_ticket, - IStream *capabilities, + IStream* print_ticket, + IStream* capabilities, BSTR* error_message); static HRESULT ConvertDevModeToPrintTicket(HPTPROVIDER provider, ULONG devmode_size_in_bytes, @@ -74,7 +73,7 @@ class PRINTING_EXPORT XPSModule { EDefaultDevmodeType base_devmode_type, EPrintTicketScope scope, ULONG* devmode_byte_count, - PDEVMODE *devmode, + PDEVMODE* devmode, BSTR* error_message); static HRESULT MergeAndValidatePrintTicket(HPTPROVIDER provider, IStream* base_ticket, @@ -84,6 +83,7 @@ class PRINTING_EXPORT XPSModule { BSTR* error_message); static HRESULT ReleaseMemory(PVOID buffer); static HRESULT CloseProvider(HPTPROVIDER provider); + private: XPSModule() { } static bool InitImpl(); @@ -115,7 +115,7 @@ class PRINTING_EXPORT XPSPrintModule { const LPCWSTR output_file_name, HANDLE progress_event, HANDLE completion_event, - UINT8 *printable_pages_on, + UINT8* printable_pages_on, UINT32 printable_pages_on_count, IXpsPrintJob **xps_print_job, IXpsPrintJobStream **document_stream, diff --git a/printing/print_settings.h b/printing/print_settings.h index 44d6aa5..8026cbc 100644 --- a/printing/print_settings.h +++ b/printing/print_settings.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. @@ -7,7 +7,6 @@ #include <string> -#include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "printing/page_range.h" #include "printing/page_setup.h" diff --git a/printing/printed_document.h b/printing/printed_document.h index 3a61541..bdb092f 100644 --- a/printing/printed_document.h +++ b/printing/printed_document.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. @@ -8,7 +8,6 @@ #include <map> #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "base/synchronization/lock.h" #include "printing/print_settings.h" diff --git a/remoting/base/decoder.h b/remoting/base/decoder.h index c4cb7fb..9286ab5 100644 --- a/remoting/base/decoder.h +++ b/remoting/base/decoder.h @@ -6,7 +6,6 @@ #define REMOTING_BASE_DECODER_H_ #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" #include "remoting/proto/video.pb.h" #include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkRegion.h" diff --git a/remoting/base/decoder_row_based.h b/remoting/base/decoder_row_based.h index a88daa0..fc76837 100644 --- a/remoting/base/decoder_row_based.h +++ b/remoting/base/decoder_row_based.h @@ -5,6 +5,8 @@ #ifndef REMOTING_BASE_DECODER_ROW_BASED_H_ #define REMOTING_BASE_DECODER_ROW_BASED_H_ +#include "base/compiler_specific.h" +#include "base/memory/scoped_ptr.h" #include "remoting/base/decoder.h" namespace remoting { diff --git a/remoting/base/decoder_vp8.h b/remoting/base/decoder_vp8.h index c316ba8..53029e2 100644 --- a/remoting/base/decoder_vp8.h +++ b/remoting/base/decoder_vp8.h @@ -5,6 +5,7 @@ #ifndef REMOTING_BASE_DECODER_VP8_H_ #define REMOTING_BASE_DECODER_VP8_H_ +#include "base/compiler_specific.h" #include "remoting/base/decoder.h" typedef struct vpx_codec_ctx vpx_codec_ctx_t; diff --git a/remoting/base/decompressor_verbatim.h b/remoting/base/decompressor_verbatim.h index cad9022..7cc8885 100644 --- a/remoting/base/decompressor_verbatim.h +++ b/remoting/base/decompressor_verbatim.h @@ -1,11 +1,11 @@ -// 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. #ifndef REMOTING_BASE_DECOMPRESSOR_VERBATIM_H_ #define REMOTING_BASE_DECOMPRESSOR_VERBATIM_H_ -#include "base/memory/scoped_ptr.h" +#include "base/compiler_specific.h" #include "remoting/base/decompressor.h" namespace remoting { diff --git a/remoting/client/plugin/pepper_view.h b/remoting/client/plugin/pepper_view.h index 30f0df0..03e02b1 100644 --- a/remoting/client/plugin/pepper_view.h +++ b/remoting/client/plugin/pepper_view.h @@ -10,7 +10,6 @@ #include <list> -#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "ppapi/cpp/graphics_2d.h" #include "ppapi/cpp/point.h" @@ -25,8 +24,7 @@ class FrameProducer; class PepperView : public ChromotingView, public FrameConsumer, - public base::SupportsWeakPtr<PepperView> -{ + public base::SupportsWeakPtr<PepperView> { public: // Constructs a PepperView for the |instance|. The |instance|, |context| // and |producer| must outlive this class. diff --git a/remoting/host/x_server_pixel_buffer.h b/remoting/host/x_server_pixel_buffer.h index 161beab..fb4180d 100644 --- a/remoting/host/x_server_pixel_buffer.h +++ b/remoting/host/x_server_pixel_buffer.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. @@ -8,7 +8,6 @@ #define REMOTING_HOST_X_SERVER_PIXEL_BUFFER_H_ #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" #include "third_party/skia/include/core/SkRect.h" #include <X11/Xutil.h> diff --git a/remoting/protocol/authentication_method.h b/remoting/protocol/authentication_method.h index a4f003e..6b171c4 100644 --- a/remoting/protocol/authentication_method.h +++ b/remoting/protocol/authentication_method.h @@ -15,8 +15,6 @@ #include <string> -#include "base/memory/scoped_ptr.h" - namespace remoting { namespace protocol { @@ -63,7 +61,7 @@ class AuthenticationMethod { private: AuthenticationMethod(); - AuthenticationMethod(HashFunction hash_function); + explicit AuthenticationMethod(HashFunction hash_function); bool invalid_; HashFunction hash_function_; diff --git a/remoting/protocol/message_decoder.h b/remoting/protocol/message_decoder.h index d1ecdcb..8384141 100644 --- a/remoting/protocol/message_decoder.h +++ b/remoting/protocol/message_decoder.h @@ -1,15 +1,14 @@ -// 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. -#ifndef REMOTING_PROTOCOL_MESSAGES_DECODER_H_ -#define REMOTING_PROTOCOL_MESSAGES_DECODER_H_ +#ifndef REMOTING_PROTOCOL_MESSAGE_DECODER_H_ +#define REMOTING_PROTOCOL_MESSAGE_DECODER_H_ #include <deque> #include <list> #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "net/base/io_buffer.h" #include "remoting/base/compound_buffer.h" #include "third_party/protobuf/src/google/protobuf/message_lite.h" @@ -59,4 +58,4 @@ class MessageDecoder { } // namespace protocol } // namespace remoting -#endif // REMOTING_PROTOCOL_MESSAGES_DECODER_H_ +#endif // REMOTING_PROTOCOL_MESSAGE_DECODER_H_ diff --git a/remoting/protocol/rtp_reader.h b/remoting/protocol/rtp_reader.h index dfd87de..ddaefee 100644 --- a/remoting/protocol/rtp_reader.h +++ b/remoting/protocol/rtp_reader.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. @@ -6,7 +6,6 @@ #define REMOTING_PROTOCOL_RTP_READER_H_ #include "base/callback.h" -#include "base/memory/scoped_ptr.h" #include "remoting/base/compound_buffer.h" #include "remoting/protocol/rtp_utils.h" #include "remoting/protocol/socket_reader_base.h" diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h index 13fc681..86af488 100644 --- a/sync/engine/syncer.h +++ b/sync/engine/syncer.h @@ -11,7 +11,6 @@ #include "base/basictypes.h" #include "base/gtest_prod_util.h" -#include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "sync/engine/conflict_resolver.h" #include "sync/engine/syncer_types.h" diff --git a/sync/internal_api/all_status.h b/sync/internal_api/all_status.h index 9887533..0f1d5b0 100644 --- a/sync/internal_api/all_status.h +++ b/sync/internal_api/all_status.h @@ -10,9 +10,9 @@ #pragma once #include <map> +#include <string> #include "base/compiler_specific.h" -#include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "sync/engine/syncer_types.h" #include "sync/engine/sync_engine_event.h" diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h index 117afc4..12a9a44 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.h @@ -21,9 +21,9 @@ #include <map> #include <string> +#include <vector> #include "base/gtest_prod_util.h" -#include "base/memory/scoped_ptr.h" #include "base/time.h" #include "sync/engine/model_safe_worker.h" #include "sync/engine/syncer_types.h" @@ -89,7 +89,7 @@ class SyncSessionContext { bool notifications_enabled() { return notifications_enabled_; } // Account name, set once a directory has been opened. - void set_account_name(const std::string name) { + void set_account_name(const std::string& name) { DCHECK(account_name_.empty()); account_name_ = name; } @@ -200,7 +200,8 @@ class ScopedSessionContextConflictResolver { } ~ScopedSessionContextConflictResolver() { context_->resolver_ = NULL; - } + } + private: SyncSessionContext* context_; ConflictResolver* resolver_; |