Skip to content

Commit

Permalink
Cleanup: Remove unneeded scoped_ptr.h includes from ppapi, printing, …
Browse files Browse the repository at this point in the history
…remoting, and sync.

BUG=none
TEST=none
TBR=brettw,hclam,akalin,abodenha

Review URL: https://chromiumcodereview.appspot.com/10387107

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137376 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
thestig@chromium.org committed May 16, 2012
1 parent 5f5f84c commit 71f40a7
Show file tree
Hide file tree
Showing 24 changed files with 58 additions and 67 deletions.
1 change: 0 additions & 1 deletion ppapi/proxy/host_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion ppapi/proxy/plugin_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion ppapi/proxy/serialized_flash_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions ppapi/shared_impl/ppb_network_list_private_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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_; }

Expand Down
2 changes: 1 addition & 1 deletion ppapi/shared_impl/ppb_url_request_info_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ppapi/shared_impl/private/ppb_host_resolver_shared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion ppapi/shared_impl/private/ppb_host_resolver_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions ppapi/shared_impl/var.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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();

Expand Down
51 changes: 26 additions & 25 deletions printing/backend/win_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -107,7 +108,7 @@ const DRIVER_INFO_6* GetDriverInfo6(HANDLE printer,
return reinterpret_cast<const DRIVER_INFO_6*>(buffer->get());
}

}
} // namespace

namespace printing {

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions printing/backend/win_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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();
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions printing/print_settings.h
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions printing/printed_document.h
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion remoting/base/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions remoting/base/decoder_row_based.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions remoting/base/decoder_vp8.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions remoting/base/decompressor_verbatim.h
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions remoting/client/plugin/pepper_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions remoting/host/x_server_pixel_buffer.h
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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>
Expand Down
4 changes: 1 addition & 3 deletions remoting/protocol/authentication_method.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#include <string>

#include "base/memory/scoped_ptr.h"

namespace remoting {
namespace protocol {

Expand Down Expand Up @@ -63,7 +61,7 @@ class AuthenticationMethod {

private:
AuthenticationMethod();
AuthenticationMethod(HashFunction hash_function);
explicit AuthenticationMethod(HashFunction hash_function);

bool invalid_;
HashFunction hash_function_;
Expand Down
9 changes: 4 additions & 5 deletions remoting/protocol/message_decoder.h
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -59,4 +58,4 @@ class MessageDecoder {
} // namespace protocol
} // namespace remoting

#endif // REMOTING_PROTOCOL_MESSAGES_DECODER_H_
#endif // REMOTING_PROTOCOL_MESSAGE_DECODER_H_
Loading

0 comments on commit 71f40a7

Please sign in to comment.