diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-10 19:24:19 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-10 19:24:19 +0000 |
commit | 5d05a0b7d54a3b89c0c08cbd8077fca39131e213 (patch) | |
tree | 62aac4dcc829a29b2f9606f998508874915ee670 | |
parent | 6e02f00eaa1ae4dce193ee36568ee907ec9c7fc2 (diff) | |
download | chromium_src-5d05a0b7d54a3b89c0c08cbd8077fca39131e213.zip chromium_src-5d05a0b7d54a3b89c0c08cbd8077fca39131e213.tar.gz chromium_src-5d05a0b7d54a3b89c0c08cbd8077fca39131e213.tar.bz2 |
Disallow copying of NetworkListObserverPrivate.
It should be prohibited to copy list observer object because otherwise
it would be impossible to guarantee that network monitor resource
is destroyed when the list observer is destroyed. Also the copied
list observer would not work properly anyway.
Review URL: https://chromiumcodereview.appspot.com/10832229
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151103 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ppapi/utility/private/network_list_observer_private.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ppapi/utility/private/network_list_observer_private.h b/ppapi/utility/private/network_list_observer_private.h index 22e1e78..066f2ff 100644 --- a/ppapi/utility/private/network_list_observer_private.h +++ b/ppapi/utility/private/network_list_observer_private.h @@ -31,6 +31,13 @@ class NetworkListObserverPrivate { virtual void OnNetworkListChanged(const NetworkListPrivate& list) = 0; private: + // Private copy constructor and assign operator to disallow copying of this + // object. This is necessary to guarantee that |monitor_| is not shared with + // another list observer and is always destroyed when this object is + // destroyed. + NetworkListObserverPrivate(const NetworkListObserverPrivate&); + void operator=(const NetworkListObserverPrivate&); + static void NetworkListCallbackHandler(void* user_data, PP_Resource list_resource); |