| Index: chrome/common/extensions/docs/examples/api/downloads/downloads_overwrite/bg.js
|
| diff --git a/chrome/common/extensions/docs/examples/api/downloads/downloads_overwrite/bg.js b/chrome/common/extensions/docs/examples/api/downloads/downloads_overwrite/bg.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d7d904762b5d6ffc35b31bdc047316b66dfa67ff
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/docs/examples/api/downloads/downloads_overwrite/bg.js
|
| @@ -0,0 +1,11 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Force all downloads to overwrite any existing files instead of inserting
|
| +// ' (1)', ' (2)', etc.
|
| +
|
| +chrome.downloads.onDeterminingFilename.addListener(function(item, suggest) {
|
| + suggest({filename: item.filename,
|
| + overwrite: true});
|
| +});
|
|
|