summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/common/extensions/url_pattern.h10
-rw-r--r--chrome_frame/chrome_frame_activex_base.h2
-rw-r--r--third_party/mongoose/mongoose.c2
-rw-r--r--tools/memory_watcher/memory_hook.h13
4 files changed, 26 insertions, 1 deletions
diff --git a/chrome/common/extensions/url_pattern.h b/chrome/common/extensions/url_pattern.h
index c0f17af..56deed5 100644
--- a/chrome/common/extensions/url_pattern.h
+++ b/chrome/common/extensions/url_pattern.h
@@ -114,6 +114,14 @@ class URLPattern {
// Parse() instead, which returns success or failure.
URLPattern(int valid_schemes, const std::string& pattern);
+#if defined(_MSC_VER) && _MSC_VER >= 1600
+ // Note: don't use this directly. This exists so URLPattern can be used
+ // with STL containers. Starting with Visual Studio 2010, we can't have this
+ // method private and use "friend class std::vector<URLPattern>;" as we used
+ // to do.
+ URLPattern();
+#endif
+
~URLPattern();
// Gets the bitmask of valid schemes.
@@ -201,11 +209,13 @@ class URLPattern {
};
private:
+#if !(defined(_MSC_VER) && _MSC_VER >= 1600)
friend class std::vector<URLPattern>;
// Note: don't use this directly. This exists so URLPattern can be used
// with STL containers.
URLPattern();
+#endif
// A bitmask containing the schemes which are considered valid for this
// pattern. Parse() uses this to decide whether a pattern contains a valid
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index 4f48c89..510de4c 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -786,7 +786,7 @@ END_MSG_MAP()
return hr;
DCHECK(handlers != NULL);
- std::remove(handlers->begin(), handlers->end(), listener);
+ handlers->erase(base::win::ScopedComPtr<IDispatch>(listener));
return hr;
}
diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c
index 035532a..8078e63 100644
--- a/third_party/mongoose/mongoose.c
+++ b/third_party/mongoose/mongoose.c
@@ -99,7 +99,9 @@ typedef long off_t;
#define DIRSEP '\\'
#define IS_DIRSEP_CHAR(c) ((c) == '/' || (c) == '\\')
#define O_NONBLOCK 0
+#if !defined(_MSC_VER) || _MSC_VER < 1600
#define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
#define _POSIX_
#define UINT64_FMT "I64"
diff --git a/tools/memory_watcher/memory_hook.h b/tools/memory_watcher/memory_hook.h
index 06a50ef..4227edb 100644
--- a/tools/memory_watcher/memory_hook.h
+++ b/tools/memory_watcher/memory_hook.h
@@ -61,6 +61,19 @@ class PrivateHookAllocator {
PrivateHookAllocator(const PrivateHookAllocator<U>&) {}
};
+template<class T, class U> inline
+bool operator==(const PrivateHookAllocator<T>&,
+ const PrivateHookAllocator<U>&) {
+ return (true);
+}
+
+template<class T, class U> inline
+bool operator!=(const PrivateHookAllocator<T>& left,
+ const PrivateHookAllocator<U>& right) {
+ return (!(left == right));
+}
+
+
// Classes which monitor memory from these hooks implement
// the MemoryObserver interface.
class MemoryObserver {