Skip to content

Commit

Permalink
NaCl cleanup: Remove/convert #includes of nacl_macros.h
Browse files Browse the repository at this point in the history
Convert to using DISALLOW_COPY_AND_ASSIGN from base/macros.h instead
of NACL_DISALLOW_COPY_AND_ASSIGN.

BUG=302078
TEST=build

Review URL: https://codereview.chromium.org/1581933003

Cr-Commit-Position: refs/heads/master@{#369843}
  • Loading branch information
mseaborn authored and Commit bot committed Jan 15, 2016
1 parent cbdf52e commit 2c2aee8
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 25 deletions.
5 changes: 2 additions & 3 deletions components/nacl/renderer/plugin/nacl_subprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/nacl/renderer/plugin/service_runtime.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/include/portability.h"

namespace plugin {
Expand Down Expand Up @@ -48,12 +47,12 @@ class NaClSubprocess {
void Shutdown();

private:
NACL_DISALLOW_COPY_AND_ASSIGN(NaClSubprocess);

std::string description_;

// The service runtime representing the NaCl module instance.
scoped_ptr<ServiceRuntime> service_runtime_;

DISALLOW_COPY_AND_ASSIGN(NaClSubprocess);
};

} // namespace plugin
Expand Down
1 change: 0 additions & 1 deletion components/nacl/renderer/plugin/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "components/nacl/renderer/plugin/utility.h"
#include "components/nacl/renderer/ppb_nacl_private.h"
#include "native_client/src/include/nacl_base.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/include/portability.h"
#include "native_client/src/include/portability_io.h"
#include "ppapi/c/pp_errors.h"
Expand Down
4 changes: 2 additions & 2 deletions components/nacl/renderer/plugin/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "components/nacl/renderer/plugin/service_runtime.h"
#include "components/nacl/renderer/plugin/utility.h"
#include "components/nacl/renderer/ppb_nacl_private.h"
#include "native_client/src/include/nacl_macros.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/private/uma_private.h"
#include "ppapi/cpp/url_loader.h"
Expand Down Expand Up @@ -97,7 +96,6 @@ class Plugin : public pp::Instance {
const PPB_NaCl_Private* nacl_interface() const { return nacl_interface_; }

private:
NACL_DISALLOW_COPY_AND_ASSIGN(Plugin);
// The browser will invoke the destructor via the pp::Instance
// pointer to this object, not from base's Delete().
~Plugin() override;
Expand Down Expand Up @@ -148,6 +146,8 @@ class Plugin : public pp::Instance {

const PPB_NaCl_Private* nacl_interface_;
pp::UMAPrivate uma_interface_;

DISALLOW_COPY_AND_ASSIGN(Plugin);
};

} // namespace plugin
Expand Down
3 changes: 1 addition & 2 deletions components/nacl/renderer/plugin/plugin_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "base/macros.h"
#include "components/nacl/renderer/ppb_nacl_private.h"
#include "native_client/src/include/nacl_macros.h"

namespace plugin {

Expand All @@ -41,7 +40,7 @@ class ErrorInfo {
private:
PP_NaClError error_code_;
std::string message_;
NACL_DISALLOW_COPY_AND_ASSIGN(ErrorInfo);
DISALLOW_COPY_AND_ASSIGN(ErrorInfo);
};

} // namespace plugin
Expand Down
5 changes: 2 additions & 3 deletions components/nacl/renderer/plugin/pnacl_coordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "components/nacl/renderer/plugin/nacl_subprocess.h"
#include "components/nacl/renderer/plugin/plugin_error.h"
#include "components/nacl/renderer/plugin/pnacl_resources.h"
#include "native_client/src/include/nacl_macros.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/utility/completion_callback_factory.h"

Expand Down Expand Up @@ -88,8 +87,6 @@ class PnaclCoordinator {
void BitcodeStreamDidFinish(int32_t pp_error);

private:
NACL_DISALLOW_COPY_AND_ASSIGN(PnaclCoordinator);

// BitcodeToNative is the factory method for PnaclCoordinators.
// Therefore the constructor is private.
PnaclCoordinator(Plugin* plugin,
Expand Down Expand Up @@ -188,6 +185,8 @@ class PnaclCoordinator {
// It accesses fields of PnaclCoordinator so it must have a
// shorter lifetime.
scoped_ptr<PnaclTranslateThread> translate_thread_;

DISALLOW_COPY_AND_ASSIGN(PnaclCoordinator);
};

//----------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions components/nacl/renderer/plugin/pnacl_resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "base/macros.h"
#include "components/nacl/renderer/ppb_nacl_private.h"
#include "native_client/src/include/nacl_macros.h"
#include "ppapi/cpp/completion_callback.h"

namespace plugin {
Expand Down Expand Up @@ -47,13 +46,13 @@ class PnaclResources {
PP_NaClFileInfo TakeFileInfo(ResourceType type);

private:
NACL_DISALLOW_COPY_AND_ASSIGN(PnaclResources);

// The plugin requesting the resource loading.
Plugin* plugin_;
bool use_subzero_;

PnaclResourceEntry resources_[NUM_TYPES + 1];

DISALLOW_COPY_AND_ASSIGN(PnaclResources);
};

} // namespace plugin
Expand Down
3 changes: 1 addition & 2 deletions components/nacl/renderer/plugin/pnacl_translate_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/nacl/renderer/plugin/plugin_error.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/shared/platform/nacl_sync_checked.h"
#include "native_client/src/shared/platform/nacl_threads.h"
#include "ppapi/cpp/completion_callback.h"
Expand Down Expand Up @@ -159,7 +158,7 @@ class PnaclTranslateThread {
base::ProcessId ld_channel_peer_pid_;

private:
NACL_DISALLOW_COPY_AND_ASSIGN(PnaclTranslateThread);
DISALLOW_COPY_AND_ASSIGN(PnaclTranslateThread);
};

}
Expand Down
1 change: 0 additions & 1 deletion components/nacl/renderer/plugin/service_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "base/logging.h"
#include "components/nacl/renderer/plugin/plugin.h"
#include "components/nacl/renderer/plugin/utility.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/include/portability_io.h"
#include "native_client/src/include/portability_string.h"
#include "native_client/src/trusted/service_runtime/nacl_error_code.h"
Expand Down
5 changes: 2 additions & 3 deletions components/nacl/renderer/plugin/service_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "base/process/process_handle.h"
#include "components/nacl/renderer/plugin/utility.h"
#include "ipc/ipc_sync_channel.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/shared/platform/nacl_sync.h"
#include "ppapi/cpp/completion_callback.h"

Expand Down Expand Up @@ -68,15 +67,15 @@ class ServiceRuntime {
base::ProcessId get_process_id() { return process_id_; }

private:
NACL_DISALLOW_COPY_AND_ASSIGN(ServiceRuntime);

Plugin* plugin_;
PP_Instance pp_instance_;
bool main_service_runtime_;
bool uses_nonsfi_mode_;

scoped_ptr<IPC::SyncChannel> translator_channel_;
base::ProcessId process_id_;

DISALLOW_COPY_AND_ASSIGN(ServiceRuntime);
};

} // namespace plugin
Expand Down
5 changes: 2 additions & 3 deletions components/nacl/renderer/plugin/temporary_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "base/files/file.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "native_client/src/include/nacl_macros.h"

#include "ppapi/c/private/pp_file_handle.h"

Expand Down Expand Up @@ -59,10 +58,10 @@ class TempFile {
PP_FileHandle GetFileHandle();

private:
NACL_DISALLOW_COPY_AND_ASSIGN(TempFile);

Plugin* plugin_;
base::File file_handle_;

DISALLOW_COPY_AND_ASSIGN(TempFile);
};

} // namespace plugin
Expand Down
1 change: 0 additions & 1 deletion components/nacl/renderer/plugin/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <stdint.h>

#include "components/nacl/renderer/ppb_nacl_private.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/include/portability.h"
#include "native_client/src/shared/platform/nacl_threads.h"
#include "native_client/src/shared/platform/nacl_time.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "native_client/src/include/elf32.h"
#include "native_client/src/include/elf_auxv.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/untrusted/nacl/nacl_startup.h"
#include "ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h"

Expand Down

0 comments on commit 2c2aee8

Please sign in to comment.