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

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

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: comments 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 #include "content/browser/download/download_id_factory.h"
6
7 #include "content/browser/download/download_id.h"
8
9 DownloadIdFactory::DownloadIdFactory(DownloadId::Domain domain)
10 : domain_(domain),
11 next_id_(0) {
12 }
13
14 DownloadId DownloadIdFactory::GetNextId() {
15 base::AutoLock lock(lock_);
16 return DownloadId(domain_, next_id_++);
Randy Smith (Not in Mondays) 2011/10/28 13:35:44 Nit's nit: For complex data types (i.e. most itera
benjhayden 2011/10/28 14:37:55 Yeah, but I'd rather initialize the counter to the
17 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698