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

Side by Side Diff: chrome/browser/resources/file_manager/common/js/util.js

Issue 98493003: Simplify fileBrowserPrivate.getDriveConnectionStatus(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the util function name. Created 7 years 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Namespace for utility functions. 8 * Namespace for utility functions.
9 */ 9 */
10 var util = {}; 10 var util = {};
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 UNSUPPORTED_FILESYSTEM: 'error_unsupported_filesystem', 1179 UNSUPPORTED_FILESYSTEM: 'error_unsupported_filesystem',
1180 INVALID_ARCHIVE: 'error_invalid_archive', 1180 INVALID_ARCHIVE: 'error_invalid_archive',
1181 AUTHENTICATION: 'error_authentication', 1181 AUTHENTICATION: 'error_authentication',
1182 PATH_UNMOUNTED: 'error_path_unmounted' 1182 PATH_UNMOUNTED: 'error_path_unmounted'
1183 }); 1183 });
1184 1184
1185 /** 1185 /**
1186 * List of connection types of drive. 1186 * List of connection types of drive.
1187 * 1187 *
1188 * Keep this in sync with the kDriveConnectionType* constants in 1188 * Keep this in sync with the kDriveConnectionType* constants in
1189 * file_browser_private_api.cc. 1189 * private_api_dirve.cc.
1190 * 1190 *
1191 * @enum {string} 1191 * @enum {string}
1192 * @const 1192 * @const
1193 */ 1193 */
1194 util.DriveConnectionType = Object.freeze({ 1194 util.DriveConnectionType = Object.freeze({
1195 OFFLINE: 'offline', // Connection is offline or drive is unavailable. 1195 OFFLINE: 'offline', // Connection is offline or drive is unavailable.
1196 METERED: 'metered', // Connection is metered. Should limit traffic. 1196 METERED: 'metered', // Connection is metered. Should limit traffic.
1197 ONLINE: 'online' // Connection is online. 1197 ONLINE: 'online' // Connection is online.
1198 }); 1198 });
1199 1199
1200 /** 1200 /**
1201 * List of reasons of DriveConnectionType. 1201 * List of reasons of DriveConnectionType.
1202 * 1202 *
1203 * Keep this in sync with the kDriveConnectionReason constants in 1203 * Keep this in sync with the kDriveConnectionReason constants in
1204 * file_browser_private_api.cc. 1204 * private_api_drive.cc.
1205 * 1205 *
1206 * @enum {string} 1206 * @enum {string}
1207 * @const 1207 * @const
1208 */ 1208 */
1209 util.DriveConnectionReason = Object.freeze({ 1209 util.DriveConnectionReason = Object.freeze({
1210 NOT_READY: 'not_ready', // Drive is not ready or authentication is failed. 1210 NOT_READY: 'not_ready', // Drive is not ready or authentication is failed.
1211 NO_NETWORK: 'no_network', // Network connection is unavailable. 1211 NO_NETWORK: 'no_network', // Network connection is unavailable.
1212 NO_SERVICE: 'no_service' // Drive service is unavailable. 1212 NO_SERVICE: 'no_service' // Drive service is unavailable.
1213 }); 1213 });
1214 1214
1215 /** 1215 /**
1216 * The type of each volume. 1216 * The type of each volume.
1217 * @enum {string} 1217 * @enum {string}
1218 * @const 1218 * @const
1219 */ 1219 */
1220 util.VolumeType = Object.freeze({ 1220 util.VolumeType = Object.freeze({
1221 DRIVE: 'drive', 1221 DRIVE: 'drive',
1222 DOWNLOADS: 'downloads', 1222 DOWNLOADS: 'downloads',
1223 REMOVABLE: 'removable', 1223 REMOVABLE: 'removable',
1224 ARCHIVE: 'archive' 1224 ARCHIVE: 'archive'
1225 }); 1225 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698