~chipaca/ubuntuone-windows-installer/miscelanea

« back to all changes in this revision

Viewing changes to src/Canonical.UbuntuOne.Client/Preferences/PreferencesDialogPresenter.cs

  • Committer: Manuel de la Pena
  • Date: 2010-11-02 22:01:15 UTC
  • mfrom: (84.4.13 performance_iprove)
  • Revision ID: mandel@themacaque.com-20101102220115-3ys5bku6j6ddwpik
Improve performance by removing the use of WCF since is not required right now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        private ISSOCredentialsProvider _ssoProvider;
37
37
        private ILog _logger;
38
38
        private readonly object _loggerLock = new object();
 
39
        private static string EventName = "UbuntuOneAutoManualSync";
 
40
        private static string ApplicationName = "UbuntuOne";
39
41
 
40
42
        #endregion
41
43
 
119
121
        private void OnCredentialsFound(object sender, CredentialsFoundEventArgs args)
120
122
        {
121
123
            // check if the credentials are for us
122
 
            if (args.ApplicationName != "UbuntuOne") return;
 
124
            if (args.ApplicationName != EventName) return;
123
125
            Logger.Info("Got the UbuntuOne credentials!");
124
126
            var oneDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
125
127
                                      "UbuntuOne");
167
169
            {
168
170
                PreferencesManager.AutoSyncFrequency = PreferencesView.AutoSyncFrequency;
169
171
                // we get the credentials, because we have register an action to the credetials aquired, we do nothing besides this
170
 
                SSOCredentialsProvider.LoginToGetCredentials();
 
172
                SSOCredentialsProvider.LoginToGetCredentials(EventName, ApplicationName);
171
173
            }
172
174
            else
173
175
            {
183
185
        {
184
186
            if(PreferencesManager.IsAutoSyncEnable)
185
187
                // we get the credentials, because we have register an action to the credetials aquired, we do nothing besides this
186
 
                SSOCredentialsProvider.LoginToGetCredentials();
 
188
                SSOCredentialsProvider.LoginToGetCredentials(EventName, ApplicationName);
187
189
        }
188
190
    }
189
191
}