summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 18:18:39 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 18:18:39 +0000
commit5d8d79c73f2ed8b77241e90388ec286cc6e73132 (patch)
treee9c646dff99632d654e47bdf90e4b9075df3e7a4 /chrome
parentec62d3bd43fc9d581f59e383c4478001f622605f (diff)
downloadchromium_src-5d8d79c73f2ed8b77241e90388ec286cc6e73132.zip
chromium_src-5d8d79c73f2ed8b77241e90388ec286cc6e73132.tar.gz
chromium_src-5d8d79c73f2ed8b77241e90388ec286cc6e73132.tar.bz2
Style and comment fixes for sync_setup_wizard_gtk.cc and sync_setup_wizard.h
BUG=none TEST=none Review URL: http://codereview.chromium.org/292038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/sync_setup_wizard_gtk.cc17
-rw-r--r--chrome/browser/gtk/sync_setup_wizard_gtk.h5
-rw-r--r--chrome/browser/sync/sync_setup_wizard.h6
3 files changed, 20 insertions, 8 deletions
diff --git a/chrome/browser/gtk/sync_setup_wizard_gtk.cc b/chrome/browser/gtk/sync_setup_wizard_gtk.cc
index e2f46a9..01c4634 100644
--- a/chrome/browser/gtk/sync_setup_wizard_gtk.cc
+++ b/chrome/browser/gtk/sync_setup_wizard_gtk.cc
@@ -7,13 +7,13 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/views/sync/sync_setup_wizard.h"
+#include "chrome/browser/sync/sync_setup_wizard.h"
#include "chrome/common/gtk_util.h"
+// SyncSetupWizard -------------------------------------------------------------
+
SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service)
- : username_textbox_(NULL),
- password_textbox_(NULL),
- service_(service),
+ : service_(service),
visible_(false) {
}
@@ -40,17 +40,22 @@ bool SyncSetupWizard::IsVisible() const {
return visible_;
}
+// SyncSetupWizardGtk ----------------------------------------------------------
+
// static
void SyncSetupWizardGtk::Show(ProfileSyncService* service,
SyncSetupWizard *wizard) {
Browser* b = BrowserList::GetLastActive();
+ wizard->set_visible(true);
new SyncSetupWizardGtk(b->window()->GetNativeHandle(), service, wizard);
}
SyncSetupWizardGtk::SyncSetupWizardGtk(GtkWindow* parent,
ProfileSyncService* service,
SyncSetupWizard *wizard)
- : service_(service),
+ : username_textbox_(NULL),
+ password_textbox_(NULL),
+ service_(service),
wizard_(wizard) {
// TODO(zork): Put in proper localized strings.
//
@@ -106,7 +111,7 @@ SyncSetupWizardGtk::SyncSetupWizardGtk(GtkWindow* parent,
}
void SyncSetupWizardGtk::OnDialogResponse(GtkWidget* widget, int response) {
- wizard_->SetVisible(false);
+ wizard_->set_visible(false);
if (response == GTK_RESPONSE_ACCEPT) {
service_->OnUserSubmittedAuth(
gtk_entry_get_text(GTK_ENTRY(username_textbox_)),
diff --git a/chrome/browser/gtk/sync_setup_wizard_gtk.h b/chrome/browser/gtk/sync_setup_wizard_gtk.h
index 2d76046..6a5dbc7 100644
--- a/chrome/browser/gtk/sync_setup_wizard_gtk.h
+++ b/chrome/browser/gtk/sync_setup_wizard_gtk.h
@@ -18,6 +18,11 @@ class ProfileSyncService;
class SyncSetupWizard;
+// This class is used as a temporary solution to allow login to bookmark sync on
+// Linux. It will be replaced with the HtmlDialog based solution when
+// window->ShowHtmlDialog() is implemented on Linux.
+// See: http://code.google.com/p/chromium/issues/detail?id=25260
+
class SyncSetupWizardGtk {
public:
// Displays the dialog box to setup sync.
diff --git a/chrome/browser/sync/sync_setup_wizard.h b/chrome/browser/sync/sync_setup_wizard.h
index d8a0d95..cc7bd2b 100644
--- a/chrome/browser/sync/sync_setup_wizard.h
+++ b/chrome/browser/sync/sync_setup_wizard.h
@@ -54,7 +54,7 @@ class SyncSetupWizard {
bool IsVisible() const;
#if defined(OS_LINUX)
- void SetVisible(bool visible) { visible_ = visible; }
+ void set_visible(bool visible) { visible_ = visible; }
#endif
private:
@@ -72,6 +72,9 @@ class SyncSetupWizard {
#if defined(OS_LINUX)
bool visible_;
#else
+ // The use of ShowHtmlDialog and SyncSetupFlowContainer is disabled on Linux
+ // until BrowserShowHtmlDialog() is implemented.
+ // See: http://code.google.com/p/chromium/issues/detail?id=25260
SyncSetupFlowContainer* flow_container_;
#endif
@@ -79,4 +82,3 @@ class SyncSetupWizard {
};
#endif // CHROME_BROWSER_SYNC_SYNC_SETUP_WIZARD_H_
-