Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / file_manager / file_manager / foreground / js / ui / multi_profile_share_dialog.js
index 73e3843..f8251bd 100644 (file)
@@ -44,10 +44,10 @@ function MultiProfileShareDialog(parentNode) {
   this.frame_.id = 'multi-profile-share-dialog';
 
   this.currentProfileId_ = new Promise(function(callback) {
-    chrome.fileBrowserPrivate.getProfiles(
+    chrome.fileManagerPrivate.getProfiles(
         function(profiles, currentId, displayedId) {
-      callback(currentId);
-    });
+          callback(currentId);
+        });
   });
 }
 
@@ -74,27 +74,26 @@ MultiProfileShareDialog.prototype = {
  *     is already opened, it returns null.
  */
 MultiProfileShareDialog.prototype.show = function(plural) {
-  return this.currentProfileId_.
-      then(function(currentProfileId) {
-        return new Promise(function(fulfill, reject) {
-          this.shareTypeSelect_.selectedIndex = 0;
-          this.mailLabel_.textContent = currentProfileId;
-          var result = FileManagerDialogBase.prototype.showOkCancelDialog.call(
-              this,
-              str(plural ?
-                  'MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL' :
-                  'MULTI_PROFILE_SHARE_DIALOG_TITLE'),
-              str(plural ?
-                  'MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL' :
-                  'MULTI_PROFILE_SHARE_DIALOG_MESSAGE'),
-              function() {
-                fulfill(this.shareTypeSelect_.value);
-              }.bind(this),
-              function() {
-                fulfill(MultiProfileShareDialog.Result.CANCEL);
-              });
-          if (!result)
-            reject(new Error('Another dialog has already shown.'));
-        }.bind(this));
-      }.bind(this));
+  return this.currentProfileId_.then(function(currentProfileId) {
+    return new Promise(function(fulfill, reject) {
+      this.shareTypeSelect_.selectedIndex = 0;
+      this.mailLabel_.textContent = currentProfileId;
+      var result = FileManagerDialogBase.prototype.showOkCancelDialog.call(
+          this,
+          str(plural ?
+              'MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL' :
+              'MULTI_PROFILE_SHARE_DIALOG_TITLE'),
+          str(plural ?
+              'MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL' :
+              'MULTI_PROFILE_SHARE_DIALOG_MESSAGE'),
+          function() {
+            fulfill(this.shareTypeSelect_.value);
+          }.bind(this),
+          function() {
+            fulfill(MultiProfileShareDialog.Result.CANCEL);
+          });
+      if (!result)
+        reject(new Error('Another dialog has already shown.'));
+    }.bind(this));
+  }.bind(this));
 };