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

Unified Diff: net/url_request/url_request_throttler_manager.h

Issue 6696023: Remove minidump analysis aides from URLRequestThrottlerManager. New (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
Index: net/url_request/url_request_throttler_manager.h
diff --git a/net/url_request/url_request_throttler_manager.h b/net/url_request/url_request_throttler_manager.h
index d1ede1d02803f875bbbeeda2e3929c4ce0251ccb..9016faedc018b5235b41dfb2330854ff56f9371e 100644
--- a/net/url_request/url_request_throttler_manager.h
+++ b/net/url_request/url_request_throttler_manager.h
@@ -4,6 +4,7 @@
#ifndef NET_URL_REQUEST_URL_REQUEST_THROTTLER_MANAGER_H_
#define NET_URL_REQUEST_URL_REQUEST_THROTTLER_MANAGER_H_
+#pragma once
#include <map>
#include <string>
@@ -11,7 +12,7 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/singleton.h"
-#include "base/threading/thread_checker_impl.h"
+#include "base/threading/non_thread_safe.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_throttler_entry.h"
@@ -26,13 +27,7 @@ namespace net {
// are registered, and does garbage collection from time to time in order to
// clean out outdated entries. URL ID consists of lowercased scheme, host, port
// and path. All URLs converted to the same ID will share the same entry.
-//
-// NOTE: All usage of the singleton object of this class should be on the same
-// thread.
-//
-// TODO(joi): Switch back to NonThreadSafe (and remove checks in release builds)
-// once crbug.com/71721 has been tracked down.
-class URLRequestThrottlerManager {
+class URLRequestThrottlerManager : public base::NonThreadSafe {
public:
static URLRequestThrottlerManager* GetInstance();
@@ -93,20 +88,10 @@ class URLRequestThrottlerManager {
// Number of requests that will be made between garbage collection.
static const unsigned int kRequestsBetweenCollecting;
- // Constructor copies the string "MAGICZZ\0" into this buffer; using it
- // to try to detect memory overwrites affecting url_entries_ in the wild.
- // TODO(joi): Remove once crbug.com/71721 is figured out.
- char magic_buffer_1_[8];
-
// Map that contains a list of URL ID and their matching
// URLRequestThrottlerEntry.
UrlEntryMap url_entries_;
- // Constructor copies the string "GOOGYZZ\0" into this buffer; using it
- // to try to detect memory overwrites affecting url_entries_ in the wild.
- // TODO(joi): Remove once crbug.com/71721 is figured out.
- char magic_buffer_2_[8];
-
// This keeps track of how many requests have been made. Used with
// GarbageCollectEntries.
unsigned int requests_since_last_gc_;
@@ -126,8 +111,6 @@ class URLRequestThrottlerManager {
// workaround.
bool being_tested_;
- base::ThreadCheckerImpl thread_checker_;
-
DISALLOW_COPY_AND_ASSIGN(URLRequestThrottlerManager);
};
« no previous file with comments | « net/url_request/url_request_throttler_header_adapter.h ('k') | net/url_request/url_request_throttler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698