summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2015-05-21 15:13:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-21 22:14:25 +0000
commitdab3548020455128b116634d3bd5db327775c7ad (patch)
treee281b4fa84fe06f6dfb630dc8c4cf573ad6f4201
parent2f5179bdef28ed701f6968d1aee81c6523e34e7b (diff)
downloadchromium_src-dab3548020455128b116634d3bd5db327775c7ad.zip
chromium_src-dab3548020455128b116634d3bd5db327775c7ad.tar.gz
chromium_src-dab3548020455128b116634d3bd5db327775c7ad.tar.bz2
Avoid basename conflict from memory_pressure_monitor.cc
This is a mechanical rename from subdirs into memory/ with _platform suffixes instead. This avoids having duplicate basenames. It would probably be better to have only memory/memory_pressure_monitor.h and then _win.cc, _mac.cc, _chromeos.cc implementations, but that's a more invasive change because of the slightly different interfaces/members. TBR=jam@chromium.org, oshima@chromium.org R=thakis@chromium.org, chrisha@chromium.org BUG=490824, gyp:384,472772 Review URL: https://codereview.chromium.org/1149223002 Cr-Commit-Position: refs/heads/master@{#331006}
-rw-r--r--base/BUILD.gn10
-rw-r--r--base/base.gyp6
-rw-r--r--base/base.gypi12
-rw-r--r--base/chromeos/OWNERS3
-rw-r--r--base/memory/BUILD.gn6
-rw-r--r--base/memory/OWNERS2
-rw-r--r--base/memory/memory_pressure_monitor_chromeos.cc (renamed from base/chromeos/memory_pressure_monitor.cc)2
-rw-r--r--base/memory/memory_pressure_monitor_chromeos.h (renamed from base/chromeos/memory_pressure_monitor.h)6
-rw-r--r--base/memory/memory_pressure_monitor_chromeos_unittest.cc (renamed from base/chromeos/memory_pressure_monitor_unittest.cc)3
-rw-r--r--base/memory/memory_pressure_monitor_mac.cc (renamed from base/mac/memory_pressure_monitor.cc)2
-rw-r--r--base/memory/memory_pressure_monitor_mac.h (renamed from base/mac/memory_pressure_monitor.h)6
-rw-r--r--base/memory/memory_pressure_monitor_mac_unittest.cc (renamed from base/mac/memory_pressure_monitor_unittest.cc)3
-rw-r--r--base/memory/memory_pressure_monitor_win.cc (renamed from base/win/memory_pressure_monitor.cc)2
-rw-r--r--base/memory/memory_pressure_monitor_win.h (renamed from base/win/memory_pressure_monitor.h)6
-rw-r--r--base/memory/memory_pressure_monitor_win_unittest.cc (renamed from base/win/memory_pressure_monitor_unittest.cc)2
-rw-r--r--chromeos/chromeos_switches.h2
-rw-r--r--content/browser/browser_main_loop.cc6
17 files changed, 40 insertions, 39 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn
index de282cf..b9363e4 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -167,8 +167,6 @@ component("base") {
"callback_internal.cc",
"callback_internal.h",
"cancelable_callback.h",
- "chromeos/memory_pressure_monitor.cc",
- "chromeos/memory_pressure_monitor.h",
"command_line.cc",
"command_line.h",
"compiler_specific.h",
@@ -287,8 +285,6 @@ component("base") {
"mac/mac_util.mm",
"mac/mach_logging.cc",
"mac/mach_logging.h",
- "mac/memory_pressure_monitor.cc",
- "mac/memory_pressure_monitor.h",
"mac/objc_property_releaser.h",
"mac/objc_property_releaser.mm",
"mac/os_crash_dumps.cc",
@@ -603,8 +599,6 @@ component("base") {
"win/iat_patch_function.h",
"win/iunknown_impl.cc",
"win/iunknown_impl.h",
- "win/memory_pressure_monitor.cc",
- "win/memory_pressure_monitor.h",
"win/message_window.cc",
"win/message_window.h",
"win/metro.cc",
@@ -1098,7 +1092,6 @@ test("base_unittests") {
"callback_unittest.cc",
"callback_unittest.nc",
"cancelable_callback_unittest.cc",
- "chromeos/memory_pressure_monitor_unittest.cc",
"command_line_unittest.cc",
"containers/adapters_unittest.cc",
"containers/hash_tables_unittest.cc",
@@ -1164,6 +1157,8 @@ test("base_unittests") {
"memory/aligned_memory_unittest.cc",
"memory/discardable_shared_memory_unittest.cc",
"memory/linked_ptr_unittest.cc",
+ "memory/memory_pressure_monitor_chromeos_unittest.cc",
+ "memory/memory_pressure_monitor_win_unittest.cc",
"memory/ref_counted_memory_unittest.cc",
"memory/ref_counted_unittest.cc",
"memory/scoped_ptr_unittest.cc",
@@ -1289,7 +1284,6 @@ test("base_unittests") {
"win/event_trace_provider_unittest.cc",
"win/i18n_unittest.cc",
"win/iunknown_impl_unittest.cc",
- "win/memory_pressure_monitor_unittest.cc",
"win/message_window_unittest.cc",
"win/object_watcher_unittest.cc",
"win/pe_image_unittest.cc",
diff --git a/base/base.gyp b/base/base.gyp
index ff6ce00..4b1bdcd 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -458,7 +458,6 @@
'callback_unittest.cc',
'callback_unittest.nc',
'cancelable_callback_unittest.cc',
- 'chromeos/memory_pressure_monitor_unittest.cc',
'command_line_unittest.cc',
'containers/adapters_unittest.cc',
'containers/hash_tables_unittest.cc',
@@ -518,7 +517,6 @@
'mac/foundation_util_unittest.mm',
'mac/libdispatch_task_runner_unittest.cc',
'mac/mac_util_unittest.mm',
- 'mac/memory_pressure_monitor_unittest.cc',
'mac/objc_property_releaser_unittest.mm',
'mac/scoped_nsobject_unittest.mm',
'mac/scoped_objc_class_swizzler_unittest.mm',
@@ -527,6 +525,9 @@
'memory/aligned_memory_unittest.cc',
'memory/discardable_shared_memory_unittest.cc',
'memory/linked_ptr_unittest.cc',
+ 'memory/memory_pressure_monitor_chromeos_unittest.cc',
+ 'memory/memory_pressure_monitor_mac_unittest.cc',
+ 'memory/memory_pressure_monitor_win_unittest.cc',
'memory/ref_counted_memory_unittest.cc',
'memory/ref_counted_unittest.cc',
'memory/scoped_ptr_unittest.cc',
@@ -655,7 +656,6 @@
'win/event_trace_provider_unittest.cc',
'win/i18n_unittest.cc',
'win/iunknown_impl_unittest.cc',
- 'win/memory_pressure_monitor_unittest.cc',
'win/message_window_unittest.cc',
'win/object_watcher_unittest.cc',
'win/pe_image_unittest.cc',
diff --git a/base/base.gypi b/base/base.gypi
index 82d810e..9bd0c28 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -128,8 +128,6 @@
'callback_internal.h',
'callback_list.h',
'cancelable_callback.h',
- 'chromeos/memory_pressure_monitor.cc',
- 'chromeos/memory_pressure_monitor.h',
'command_line.cc',
'command_line.h',
'compiler_specific.h',
@@ -296,8 +294,6 @@
'mac/mac_util.mm',
'mac/mach_logging.cc',
'mac/mach_logging.h',
- 'mac/memory_pressure_monitor.cc',
- 'mac/memory_pressure_monitor.h',
'mac/objc_property_releaser.h',
'mac/objc_property_releaser.mm',
'mac/os_crash_dumps.cc',
@@ -342,6 +338,12 @@
'memory/memory_pressure_listener.h',
'memory/memory_pressure_monitor.cc',
'memory/memory_pressure_monitor.h',
+ 'memory/memory_pressure_monitor_chromeos.cc',
+ 'memory/memory_pressure_monitor_chromeos.h',
+ 'memory/memory_pressure_monitor_mac.cc',
+ 'memory/memory_pressure_monitor_mac.h',
+ 'memory/memory_pressure_monitor_win.cc',
+ 'memory/memory_pressure_monitor_win.h',
'memory/raw_scoped_refptr_mismatch_checker.h',
'memory/ref_counted.cc',
'memory/ref_counted.h',
@@ -709,8 +711,6 @@
'win/iat_patch_function.h',
'win/iunknown_impl.cc',
'win/iunknown_impl.h',
- 'win/memory_pressure_monitor.cc',
- 'win/memory_pressure_monitor.h',
'win/message_window.cc',
'win/message_window.h',
'win/metro.cc',
diff --git a/base/chromeos/OWNERS b/base/chromeos/OWNERS
deleted file mode 100644
index 8fda46a..0000000
--- a/base/chromeos/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-skuhne@chromium.org
-oshima@chromium.org
-
diff --git a/base/memory/BUILD.gn b/base/memory/BUILD.gn
index 8b13c7a..d7a1190 100644
--- a/base/memory/BUILD.gn
+++ b/base/memory/BUILD.gn
@@ -18,6 +18,12 @@ source_set("memory") {
"memory_pressure_listener.h",
"memory_pressure_monitor.cc",
"memory_pressure_monitor.h",
+ "memory_pressure_monitor_chromeos.cc",
+ "memory_pressure_monitor_chromeos.h",
+ "memory_pressure_monitor_mac.h",
+ "memory_pressure_monitor_mac.h",
+ "memory_pressure_monitor_win.cc",
+ "memory_pressure_monitor_win.cc",
"raw_scoped_refptr_mismatch_checker.h",
"ref_counted.cc",
"ref_counted.h",
diff --git a/base/memory/OWNERS b/base/memory/OWNERS
new file mode 100644
index 0000000..bcaf778
--- /dev/null
+++ b/base/memory/OWNERS
@@ -0,0 +1,2 @@
+per-file *chromeos*=skuhne@chromium.org
+per-file *chromeos*=oshima@chromium.org
diff --git a/base/chromeos/memory_pressure_monitor.cc b/base/memory/memory_pressure_monitor_chromeos.cc
index 5e8aadf..640e463 100644
--- a/base/chromeos/memory_pressure_monitor.cc
+++ b/base/memory/memory_pressure_monitor_chromeos.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/chromeos/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_chromeos.h"
#include <fcntl.h>
#include <sys/select.h>
diff --git a/base/chromeos/memory_pressure_monitor.h b/base/memory/memory_pressure_monitor_chromeos.h
index bed1ec3..ff8992a 100644
--- a/base/chromeos/memory_pressure_monitor.h
+++ b/base/memory/memory_pressure_monitor_chromeos.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_CHROMEOS_MEMORY_PRESSURE_MONITOR_H_
-#define BASE_CHROMEOS_MEMORY_PRESSURE_MONITOR_H_
+#ifndef BASE_MEMORY_MEMORY_PRESSURE_MONITOR_CHROMEOS_H_
+#define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_CHROMEOS_H_
#include "base/base_export.h"
#include "base/files/scoped_file.h"
@@ -116,4 +116,4 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
} // namespace chromeos
} // namespace base
-#endif // BASE_CHROMEOS_MEMORY_PRESSURE_MONITOR_H_
+#endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_CHROMEOS_H_
diff --git a/base/chromeos/memory_pressure_monitor_unittest.cc b/base/memory/memory_pressure_monitor_chromeos_unittest.cc
index 4fb8332..e0afa44 100644
--- a/base/chromeos/memory_pressure_monitor_unittest.cc
+++ b/base/memory/memory_pressure_monitor_chromeos_unittest.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/memory_pressure_monitor_chromeos.h"
+
#include "base/basictypes.h"
-#include "base/chromeos/memory_pressure_monitor.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/message_loop/message_loop.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/mac/memory_pressure_monitor.cc b/base/memory/memory_pressure_monitor_mac.cc
index 5667aa6..f394935 100644
--- a/base/mac/memory_pressure_monitor.cc
+++ b/base/memory/memory_pressure_monitor_mac.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/mac/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_mac.h"
#include <dlfcn.h>
#include <sys/sysctl.h>
diff --git a/base/mac/memory_pressure_monitor.h b/base/memory/memory_pressure_monitor_mac.h
index afaec27..8d4c26a 100644
--- a/base/mac/memory_pressure_monitor.h
+++ b/base/memory/memory_pressure_monitor_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
-#define BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
+#ifndef BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
+#define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
#include <dispatch/dispatch.h>
@@ -60,4 +60,4 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
} // namespace mac
} // namespace base
-#endif // BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
+#endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
diff --git a/base/mac/memory_pressure_monitor_unittest.cc b/base/memory/memory_pressure_monitor_mac_unittest.cc
index acb3666..e037a9d 100644
--- a/base/mac/memory_pressure_monitor_unittest.cc
+++ b/base/memory/memory_pressure_monitor_mac_unittest.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/mac/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_mac.h"
+
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
diff --git a/base/win/memory_pressure_monitor.cc b/base/memory/memory_pressure_monitor_win.cc
index ed49a40..4349d03 100644
--- a/base/win/memory_pressure_monitor.cc
+++ b/base/memory/memory_pressure_monitor_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/win/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_win.h"
#include <windows.h>
diff --git a/base/win/memory_pressure_monitor.h b/base/memory/memory_pressure_monitor_win.h
index 933d912..07f04eb 100644
--- a/base/win/memory_pressure_monitor.h
+++ b/base/memory/memory_pressure_monitor_win.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_WIN_MEMORY_PRESSURE_MONITOR_H_
-#define BASE_WIN_MEMORY_PRESSURE_MONITOR_H_
+#ifndef BASE_MEMORY_MEMORY_PRESSURE_MONITOR_WIN_H_
+#define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_WIN_H_
#include "base/base_export.h"
#include "base/memory/memory_pressure_listener.h"
@@ -141,4 +141,4 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
} // namespace win
} // namespace base
-#endif // BASE_WIN_MEMORY_PRESSURE_MONITOR_H_
+#endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_WIN_H_
diff --git a/base/win/memory_pressure_monitor_unittest.cc b/base/memory/memory_pressure_monitor_win_unittest.cc
index 40a25a7..d9a9575 100644
--- a/base/win/memory_pressure_monitor_unittest.cc
+++ b/base/memory/memory_pressure_monitor_win_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/win/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_win.h"
#include "base/basictypes.h"
#include "base/memory/memory_pressure_listener.h"
diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h
index 384d327..3aa9a7c 100644
--- a/chromeos/chromeos_switches.h
+++ b/chromeos/chromeos_switches.h
@@ -5,7 +5,7 @@
#ifndef CHROMEOS_CHROMEOS_SWITCHES_H_
#define CHROMEOS_CHROMEOS_SWITCHES_H_
-#include "base/chromeos/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_chromeos.h"
#include "chromeos/chromeos_export.h"
namespace chromeos {
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index c0117c5..50d0d82 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -91,7 +91,7 @@
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
-#include "base/mac/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_mac.h"
#include "content/browser/bootstrap_sandbox_mac.h"
#include "content/browser/cocoa/system_hotkey_helper_mac.h"
#include "content/browser/compositor/browser_compositor_view_mac.h"
@@ -103,7 +103,7 @@
#include <commctrl.h>
#include <shellapi.h>
-#include "base/win/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_win.h"
#include "content/browser/system_message_window_win.h"
#include "content/common/sandbox_win.h"
#include "net/base/winsock_init.h"
@@ -111,7 +111,7 @@
#endif
#if defined(OS_CHROMEOS)
-#include "base/chromeos/memory_pressure_monitor.h"
+#include "base/memory/memory_pressure_monitor_chromeos.h"
#include "chromeos/chromeos_switches.h"
#endif