Skip to content

Commit

Permalink
Bug 1361171 - Remove CloudSync. r=markh
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: CjBsEZa6oIP
  • Loading branch information
Kit Cambridge committed May 1, 2017
1 parent 08dea32 commit 8edc4f6
Show file tree
Hide file tree
Showing 35 changed files with 5 additions and 2,825 deletions.
8 changes: 1 addition & 7 deletions browser/base/content/browser-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "EnsureFxAccountsWebChannel",
"resource://gre/modules/FxAccountsWebChannel.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Weave",
"resource://services-sync/main.js");
if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
"resource://gre/modules/CloudSync.jsm");
}

const MIN_STATUS_ANIMATION_DURATION = 1600;

Expand Down Expand Up @@ -223,9 +219,7 @@ var gSync = {
document.getElementById("sync-setup-state").hidden = true;
document.getElementById("sync-syncnow-state").hidden = true;

if (CloudSync && CloudSync.ready && CloudSync().adapters.count) {
document.getElementById("sync-syncnow-state").hidden = false;
} else if (status == UIState.STATUS_LOGIN_FAILED) {
if (status == UIState.STATUS_LOGIN_FAILED) {
// unhiding this element makes the menubar show the login failure state.
document.getElementById("sync-reauth-state").hidden = false;
} else if (status == UIState.STATUS_NOT_CONFIGURED ||
Expand Down
57 changes: 3 additions & 54 deletions browser/base/content/sync/aboutSyncTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,13 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
"resource://gre/modules/Promise.jsm");

if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
"resource://gre/modules/CloudSync.jsm");
}

var RemoteTabViewer = {
_tabsList: null,

init() {
Services.obs.addObserver(this, "weave:service:login:finish");
Services.obs.addObserver(this, "weave:engine:sync:finish");

Services.obs.addObserver(this, "cloudsync:tabs:update");

this._tabsList = document.getElementById("tabsList");

this.buildList(true);
Expand All @@ -39,8 +32,6 @@ var RemoteTabViewer = {
uninit() {
Services.obs.removeObserver(this, "weave:service:login:finish");
Services.obs.removeObserver(this, "weave:engine:sync:finish");

Services.obs.removeObserver(this, "cloudsync:tabs:update");
},

createItem(attrs) {
Expand Down Expand Up @@ -178,18 +169,9 @@ var RemoteTabViewer = {
// or tell the appropriate condition. (bug 583344)
}

let complete = () => {
this._waitingForBuildList = false;
if (this._buildListRequested) {
CommonUtils.nextTick(this.buildList, this);
}
}

if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
this._generateCloudSyncTabList()
.then(complete, complete);
} else {
complete();
this._waitingForBuildList = false;
if (this._buildListRequested) {
CommonUtils.nextTick(this.buildList, this);
}
},

Expand Down Expand Up @@ -246,36 +228,6 @@ var RemoteTabViewer = {
}
},

_generateCloudSyncTabList() {
let updateTabList = remoteTabs => {
let list = this._tabsList;

for (let client of remoteTabs) {
let clientAttrs = {
type: "client",
clientName: client.name,
};

let clientEnt = this.createItem(clientAttrs);
list.appendChild(clientEnt);

for (let tab of client.tabs) {
let tabAttrs = {
type: "tab",
title: tab.title,
url: tab.url,
icon: this.getIcon(tab.icon),
};
let tabEnt = this.createItem(tabAttrs);
list.appendChild(tabEnt);
}
}
};

return CloudSync().tabs.getRemoteTabs()
.then(updateTabList, Promise.reject.bind(Promise));
},

adjustContextMenu(event) {
let mode = "all";
switch (this._tabsList.selectedItems.length) {
Expand Down Expand Up @@ -335,9 +287,6 @@ var RemoteTabViewer = {
this.buildList(false);
}
break;
case "cloudsync:tabs:update":
this.buildList(false);
break;
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ var whitelist = new Set([
{file: "chrome://global/locale/printjoboptions.dtd",
platforms: ["macosx", "win"]},

// services/cloudsync/CloudSyncLocal.jsm
{file: "chrome://weave/locale/errors.properties"},

// devtools/client/inspector/bin/dev-server.js
Expand Down
3 changes: 0 additions & 3 deletions browser/components/places/PlacesUIUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ Cu.import("resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesTransactions",
"resource://gre/modules/PlacesTransactions.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
"resource://gre/modules/CloudSync.jsm");

XPCOMUtils.defineLazyModuleGetter(this, "Weave",
"resource://services-sync/main.js");

Expand Down
1 change: 0 additions & 1 deletion browser/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
imply_option('MOZ_PLACES', True)
imply_option('MOZ_SERVICES_HEALTHREPORT', True)
imply_option('MOZ_SERVICES_SYNC', True)
imply_option('MOZ_SERVICES_CLOUDSYNC', True)

include('../toolkit/moz.configure')
89 changes: 0 additions & 89 deletions services/cloudsync/CloudSync.jsm

This file was deleted.

88 changes: 0 additions & 88 deletions services/cloudsync/CloudSyncAdapters.jsm

This file was deleted.

Loading

0 comments on commit 8edc4f6

Please sign in to comment.