1// Copyright (c) 2012 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// Force all downloads to overwrite any existing files instead of inserting
6// ' (1)', ' (2)', etc.
7
8chrome.downloads.onDeterminingFilename.addListener(function(item, suggest) {
9  suggest({filename: item.filename,
10           conflict_action: 'overwrite',
11           conflictAction: 'overwrite'});
12  // conflict_action was renamed to conflictAction in
13  // http://src.chromium.org/viewvc/chrome?view=rev&revision=214133
14  // which was first picked up in branch 1580.
15});
16