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

Side by Side Diff: content/browser/download/download_id_factory.h

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix ifndefs Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ID_FACTORY_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ID_FACTORY_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/lock.h"
11 #include "content/browser/download/download_id.h"
12 #include "content/public/browser/browser_thread.h"
13
14 class DownloadManager;
15
16 class CONTENT_EXPORT DownloadIdFactory
17 : public base::RefCountedThreadSafe<DownloadIdFactory> {
18 public:
19 // TODO(benjhayden): Instantiate with an explicit next id counter read from
20 // persistent storage.
21 DownloadIdFactory(DownloadId::Domain domain);
22
23 DownloadId GetNextId();
24
25 private:
26 DownloadId::Domain domain_;
27 int next_id_;
28 base::Lock lock_;
29
30 DISALLOW_COPY_AND_ASSIGN(DownloadIdFactory);
31 };
32
33 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ID_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_id.cc ('k') | content/browser/download/download_id_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698