diff options
author | jeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-30 22:47:42 +0000 |
---|---|---|
committer | jeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-30 22:47:42 +0000 |
commit | c90d849636fd9db7f79f2f2b4611f2bcff0c5700 (patch) | |
tree | f9b367a0243559811d02389900def80ab84f9139 | |
parent | b70386476df8f11fbad872195f48518b20b20b41 (diff) | |
download | chromium_src-c90d849636fd9db7f79f2f2b4611f2bcff0c5700.zip chromium_src-c90d849636fd9db7f79f2f2b4611f2bcff0c5700.tar.gz chromium_src-c90d849636fd9db7f79f2f2b4611f2bcff0c5700.tar.bz2 |
Fix miscellaneous compilation bugs under Visual Studio 2010.
BUG=71145
TEST=Run unit tests
Review URL: http://codereview.chromium.org/6240017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73119 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/common/extensions/url_pattern.h | 10 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 2 | ||||
-rw-r--r-- | third_party/mongoose/mongoose.c | 2 | ||||
-rw-r--r-- | tools/memory_watcher/memory_hook.h | 13 |
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 { |