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

Unified Diff: chrome/browser/resources/options/personal_options.js

Issue 3069008: remove the chromeos include and reland (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 5 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
« no previous file with comments | « chrome/browser/resources/options/personal_options.html ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/personal_options.js
diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js
index 9925adcc9041ed6556c17fbb67fdd8a9d79a1df9..b5d2d28b7bf91bd5ac36cb106650f6511d0e659f 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -21,23 +21,36 @@ PersonalOptions.prototype = {
// Call base class implementation to starts preference initialization.
OptionsPage.prototype.initializePage.call(this);
-
// Listen to pref changes.
Preferences.getInstance().addEventListener('sync.has_setup_completed',
function(event) {
if(event.value) {
+ chrome.send('getSyncStatus');
$('text-when-synced').style.display = 'block';
$('button-when-synced').style.display = 'block';
+ $('stop-sync').onclick = function(event) {
+ OptionsPage.showOverlay('stopSyncingOverlay');
+ };
+
+ $('sync-customize').onclick = function(event) {
+ OptionsPage.showPageByName('sync');
+ };
+
+ $('text-when-not-synced').style.display = 'none';
+ $('button-when-not-synced').style.display = 'none';
}
else {
$('text-when-not-synced').style.display = 'block';
$('button-when-not-synced').style.display = 'block';
+ $('start-sync').onclick = function(event) {
+ //TODO(sargrass): Show start-sync subpage, after dhg done.
+ };
+
+ $('text-when-synced').style.display = 'none';
+ $('button-when-synced').style.display = 'none';
}
});
- $('sync-customize').onclick = function(event) {
- OptionsPage.showPageByName('sync');
- };
$('showpasswords').onclick = function(event) {
//TODO(sargrass): Show passwords dialog here.
@@ -48,7 +61,7 @@ PersonalOptions.prototype = {
};
$('import_data').onclick = function(event) {
- //TODO(sargrass): Show import_data dialog here.
+ OptionsPage.showOverlay('importDataOverlay');
};
if(!cr.isChromeOS && navigator.platform.match(/linux|BSD/i)) {
@@ -66,6 +79,13 @@ PersonalOptions.prototype = {
//TODO(sargrass): Show themes reset dialog here.
};
}
+ },
+ syncStatusCallback_: function(statusString) {
+ $('synced_to_user_with_time').textContent = statusString;
},
};
+
+PersonalOptions.syncStatusCallback = function(statusString){
+ PersonalOptions.getInstance().syncStatusCallback_(statusString);
+};
« no previous file with comments | « chrome/browser/resources/options/personal_options.html ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698