Commit 5d05a0b7 authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

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
parent 6e02f00e
...@@ -31,6 +31,13 @@ class NetworkListObserverPrivate { ...@@ -31,6 +31,13 @@ class NetworkListObserverPrivate {
virtual void OnNetworkListChanged(const NetworkListPrivate& list) = 0; virtual void OnNetworkListChanged(const NetworkListPrivate& list) = 0;
private: 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, static void NetworkListCallbackHandler(void* user_data,
PP_Resource list_resource); PP_Resource list_resource);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment