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

Side by Side Diff: remoting/host/mac/me2me_preference_pane.mm

Issue 595063005: Save the client base JID for authentication in case it differs from the email (for accounts non-Goo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add jsdoc Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « remoting/host/host_status_observer.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "remoting/host/mac/me2me_preference_pane.h" 5 #import "remoting/host/mac/me2me_preference_pane.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <CommonCrypto/CommonHMAC.h> 8 #include <CommonCrypto/CommonHMAC.h>
9 #include <errno.h> 9 #include <errno.h>
10 #include <launch.h> 10 #include <launch.h>
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 message = @"Remote connections to this computer are disabled. To enable " 461 message = @"Remote connections to this computer are disabled. To enable "
462 "remote connections you must confirm your PIN."; 462 "remote connections you must confirm your PIN.";
463 } else { 463 } else {
464 message = @"Remote connections to this computer are disabled."; 464 message = @"Remote connections to this computer are disabled.";
465 } 465 }
466 } 466 }
467 [status_message_ setStringValue:message]; 467 [status_message_ setStringValue:message];
468 468
469 std::string email; 469 std::string email;
470 if (config_.get()) { 470 if (config_.get()) {
471 bool result = config_->GetString(remoting::kHostOwnerConfigPath, &email); 471 bool result =
472 config_->GetString(remoting::kHostOwnerEmailConfigPath, &email);
472 if (!result) { 473 if (!result) {
473 result = config_->GetString(remoting::kXmppLoginConfigPath, &email); 474 result = config_->GetString(remoting::kHostOwnerConfigPath, &email);
475 if (!result) {
476 result = config_->GetString(remoting::kXmppLoginConfigPath, &email);
474 477
475 // The config has already been checked by |IsConfigValid|. 478 // The config has already been checked by |IsConfigValid|.
476 if (!result) { 479 if (!result) {
477 [self showError]; 480 [self showError];
478 return; 481 return;
482 }
479 } 483 }
480 } 484 }
481 } 485 }
482 [disable_view_ setEnabled:(is_pane_unlocked_ && is_service_running_ && 486 [disable_view_ setEnabled:(is_pane_unlocked_ && is_service_running_ &&
483 !restart_pending_or_canceled_)]; 487 !restart_pending_or_canceled_)];
484 [confirm_pin_view_ setEnabled:(is_pane_unlocked_ && 488 [confirm_pin_view_ setEnabled:(is_pane_unlocked_ &&
485 !restart_pending_or_canceled_)]; 489 !restart_pending_or_canceled_)];
486 [confirm_pin_view_ setEmail:[NSString stringWithUTF8String:email.c_str()]]; 490 [confirm_pin_view_ setEmail:[NSString stringWithUTF8String:email.c_str()]];
487 NSString* applyButtonText = is_service_running_ ? @"Confirm" : @"Enable"; 491 NSString* applyButtonText = is_service_running_ ? @"Confirm" : @"Enable";
488 [confirm_pin_view_ setButtonText:applyButtonText]; 492 [confirm_pin_view_ setButtonText:applyButtonText];
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 NSArray* arguments = [NSArray arrayWithObjects:@"--relaunch-prefpane", nil]; 753 NSArray* arguments = [NSArray arrayWithObjects:@"--relaunch-prefpane", nil];
750 [task setLaunchPath:command]; 754 [task setLaunchPath:command];
751 [task setArguments:arguments]; 755 [task setArguments:arguments];
752 [task setStandardInput:[NSPipe pipe]]; 756 [task setStandardInput:[NSPipe pipe]];
753 [task launch]; 757 [task launch];
754 [task release]; 758 [task release];
755 [NSApp terminate:nil]; 759 [NSApp terminate:nil];
756 } 760 }
757 761
758 @end 762 @end
OLDNEW
« no previous file with comments | « remoting/host/host_status_observer.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698