summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 00:36:17 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-20 00:36:17 +0000
commit6c59ab46825b33b24780dace2b403aadf429bc15 (patch)
tree247590feebb80fc389d82633da913993449b7a01 /chrome_frame
parent0236aa8e8a64cc2ef7d6ebc9dc9e23ccd3dd469e (diff)
downloadchromium_src-6c59ab46825b33b24780dace2b403aadf429bc15.zip
chromium_src-6c59ab46825b33b24780dace2b403aadf429bc15.tar.gz
chromium_src-6c59ab46825b33b24780dace2b403aadf429bc15.tar.bz2
Extend scoped_ptr to be closer to unique_ptr. Support custom deleters, and deleting arrays.
This is based on the modifications by "Geoffrey Romer" <gromer@google.com> to Google's internal version of scoped_ptr<>. All cleaver tricks are his, not mine. :) It brings most of the features of C++11's unique_ptr<> into this class and should eliminate the need for scoped_array<>, scoped_malloc_free<>, and possibly a few other scopers. Please refer to the unique_ptr<> API for documentation. Divergence from unique_ptr<>: 1) DefaultDeleter<T[n]> (sized-arrays) is explicitly disabled because this construct would cause the single-object delete to be called on a pointer to a T[n]. It is impossible to construct a single-object new expression that returns a T[n]*. You can only get this with new[] which should correspond to DefaultDeleter<T[n][]>. This issue has been raised with the C++ LWG as it is possible a unique_ptr<> spec defect. 2) Reference types for Deleters are not supported. This simplifies implementation significantly because there is no need to distinguish between the converting constructor + converting assignment operator and their move constructor + move assignment operator. 4) Move-only Deleters are not supported. Avoids the need to emulate std::forward(). BUG=109874 TBR=dhollowa,kinuko,ananta,hans,scherkus Review URL: https://codereview.chromium.org/11149006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_launcher_utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome_frame/chrome_launcher_utils.h b/chrome_frame/chrome_launcher_utils.h
index 699e75e..a4b79e9 100644
--- a/chrome_frame/chrome_launcher_utils.h
+++ b/chrome_frame/chrome_launcher_utils.h
@@ -6,10 +6,10 @@
#define CHROME_FRAME_CHROME_LAUNCHER_UTILS_H_
#include <string>
+#include "base/memory/scoped_ptr.h"
class CommandLine;
class FilePath;
-template <class C> class scoped_ptr;
namespace chrome_launcher {