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

Unified Diff: content/browser/download/download_manager.h

Issue 7793003: Revert 98656 - Make a new integer field in sql::MetaTable (a per-profile db) containing a counter... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « content/browser/download/download_item.cc ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager.h
===================================================================
--- content/browser/download/download_manager.h (revision 98659)
+++ content/browser/download/download_manager.h (working copy)
@@ -34,7 +34,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/callback.h"
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/hash_tables.h"
@@ -42,7 +41,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
-#include "base/synchronization/lock.h"
#include "base/time.h"
#include "content/browser/browser_thread.h"
#include "content/browser/download/download_item.h"
@@ -108,24 +106,6 @@
// everything.
void SearchDownloads(const string16& query, DownloadVector* result);
- // Returns the next download id in a DownloadId and increments the counter.
- // May be called on any thread. The incremented counter is not persisted, but
- // the base counter for this accessor is initialized from the largest id
- // actually saved to the download history database.
- DownloadId GetNextId();
-
- // Instead of passing a DownloadManager* between threads and hoping users only
- // call GetNextId(), you can pass this thunk around instead. Pass the thunk
- // around by const ref and store it by copy per the base::Callback interface.
- // The thunk may be copied, including between threads. If you change
- // GetNextIdThunkType from base::Callback, then you should think about how
- // you're changing the ref-count of DownloadManager. Use it like:
- // const DownloadManager::GetNextIdThunkType& next_id_thunk =
- // download_manager->GetNextIdThunk();
- // id = next_id_thunk.Run();
- typedef base::Callback<DownloadId(void)> GetNextIdThunkType;
- GetNextIdThunkType GetNextIdThunk();
-
// Returns true if initialized properly.
bool Init(content::BrowserContext* browser_context);
@@ -206,11 +186,6 @@
// Remove a download observer from ourself.
void RemoveObserver(Observer* observer);
- // Called by the embedder after creating the download manager to inform it of
- // the next available download id.
- // TODO(benjhayden): Separate this functionality out into a separate object.
- void OnPersistentStoreGetNextId(int next_id);
-
// Called by the embedder, after creating the download manager, to let it know
// about downloads from previous runs of the browser.
void OnPersistentStoreQueryComplete(
@@ -393,9 +368,6 @@
// The current active browser context.
content::BrowserContext* browser_context_;
- base::Lock next_id_lock_;
- int next_id_;
-
// Non-owning pointer for handling file writing on the download_thread_.
DownloadFileManager* file_manager_;
« no previous file with comments | « content/browser/download/download_item.cc ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698