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

Unified Diff: ui/file_manager/zip_archiver/unpacker/js/compressor-foreground.js

Issue 2804453002: Move files from zip_archiver/unpacker/ to zip_archiver/. (Closed)
Patch Set: Move files from zip_archiver/unpacker/ to zip_archiver/. Created 3 years, 8 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
Index: ui/file_manager/zip_archiver/unpacker/js/compressor-foreground.js
diff --git a/ui/file_manager/zip_archiver/unpacker/js/compressor-foreground.js b/ui/file_manager/zip_archiver/unpacker/js/compressor-foreground.js
deleted file mode 100644
index bf482e369da54dee439897d90a3381488fcf75b2..0000000000000000000000000000000000000000
--- a/ui/file_manager/zip_archiver/unpacker/js/compressor-foreground.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2017 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-window.onload = function() {
- chrome.runtime.getBackgroundPage(function(backgroundPage) {
-
- // Called from the background page. We need to place this function here
- // because chrome.fileSystem.chooseEntry only works on forground page.
- backgroundPage.unpacker.Compressor.prototype.createArchiveFileForeground_ =
- function(compressorId) {
- var compressor =
- backgroundPage.unpacker.app.compressors[compressorId];
- var suggestedName = compressor.archiveName_;
- // Create an archive file.
- chrome.fileSystem.chooseEntry(
- {type: 'saveFile', suggestedName: suggestedName},
- function(entry, fileEntries) {
- if (!entry) {
- console.error('Failed to create an archive file.');
- compressor.onError_(compressor.compressorId_);
- return;
- }
-
- compressor.archiveFileEntry_ = entry;
-
- compressor.sendCreateArchiveRequest_();
- });
- };
-
- // Some compressors are waiting for this foreground page to be loaded.
- backgroundPage.unpacker.Compressor.CompressorIdQueue.forEach(
- function(compressorId) {
- var compressor =
- backgroundPage.unpacker.app.compressors[compressorId];
- compressor.createArchiveFileForeground_(compressorId);
- });
- });
-};
« no previous file with comments | « ui/file_manager/zip_archiver/unpacker/js/compressor.js ('k') | ui/file_manager/zip_archiver/unpacker/js/decompressor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698