Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2943)

Unified Diff: chrome/browser/automation/automation_resource_message_filter.h

Issue 174345: Making RegisterRequest and UnregisterRequest virtual so that they can be over... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/automation/automation_resource_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_resource_message_filter.h
===================================================================
--- chrome/browser/automation/automation_resource_message_filter.h (revision 24090)
+++ chrome/browser/automation/automation_resource_message_filter.h (working copy)
@@ -7,6 +7,7 @@
#include <map>
+#include "base/atomicops.h"
#include "base/lock.h"
#include "base/platform_thread.h"
#include "ipc/ipc_channel_proxy.h"
@@ -40,7 +41,7 @@
virtual ~AutomationResourceMessageFilter();
int NewRequestId() {
- return unique_request_id_++;
+ return base::subtle::Barrier_AtomicIncrement(&unique_request_id_, 1);
amit 2009/08/24 22:49:57 How about base::AtomicRefCountInc from base\atomic
tommi (sloooow) - chröme 2009/08/25 02:13:18 I did look at that but there are two reasons why I
}
// IPC::ChannelProxy::MessageFilter methods:
@@ -53,10 +54,10 @@
virtual bool Send(IPC::Message* message);
// Add request to the list of outstanding requests.
- bool RegisterRequest(URLRequestAutomationJob* job);
+ virtual bool RegisterRequest(URLRequestAutomationJob* job);
// Remove request from the list of outstanding requests.
- void UnRegisterRequest(URLRequestAutomationJob* job);
+ virtual void UnRegisterRequest(URLRequestAutomationJob* job);
// Can be called from the UI thread.
static bool RegisterRenderView(int renderer_pid, int renderer_id,
@@ -99,7 +100,7 @@
static MessageLoop* io_loop_;
// A unique request id per automation channel.
amit 2009/08/24 22:49:57 no longer unique per channel, pl update the commen
tommi (sloooow) - chröme 2009/08/25 02:13:18 changed to "// A unique request id per process."
- int unique_request_id_;
+ static int unique_request_id_;
amit 2009/08/24 22:49:57 static AutomicRefCount unique_request_id_?
// Map of outstanding requests.
RequestMap request_map_;
« no previous file with comments | « no previous file | chrome/browser/automation/automation_resource_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698