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

Side by Side Diff: remoting/host/remoting_me2me_host.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/it2me/it2me_host.cc ('k') | third_party/zlib/google/zip_reader.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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 // If the user does not have a Google email, their client JID will not be 1077 // If the user does not have a Google email, their client JID will not be
1078 // based on their email. In that case, the username/host domain policies 1078 // based on their email. In that case, the username/host domain policies
1079 // would be meaningless, since there is no way to check that the JID 1079 // would be meaningless, since there is no way to check that the JID
1080 // trying to connect actually corresponds to the owner email in question. 1080 // trying to connect actually corresponds to the owner email in question.
1081 if (host_owner_ != host_owner_email_) { 1081 if (host_owner_ != host_owner_email_) {
1082 LOG(ERROR) << "The username and host domain policies cannot be enabled " 1082 LOG(ERROR) << "The username and host domain policies cannot be enabled "
1083 << "for accounts with a non-Google email."; 1083 << "for accounts with a non-Google email.";
1084 ShutdownHost(kInvalidHostDomainExitCode); 1084 ShutdownHost(kInvalidHostDomainExitCode);
1085 } 1085 }
1086 1086
1087 if (!EndsWith(host_owner_, std::string("@") + host_domain_, false)) { 1087 if (!base::EndsWith(host_owner_, std::string("@") + host_domain_, false)) {
1088 LOG(ERROR) << "The host domain does not match the policy."; 1088 LOG(ERROR) << "The host domain does not match the policy.";
1089 ShutdownHost(kInvalidHostDomainExitCode); 1089 ShutdownHost(kInvalidHostDomainExitCode);
1090 } 1090 }
1091 } 1091 }
1092 } 1092 }
1093 1093
1094 bool HostProcess::OnHostDomainPolicyUpdate(base::DictionaryValue* policies) { 1094 bool HostProcess::OnHostDomainPolicyUpdate(base::DictionaryValue* policies) {
1095 // Returns true if the host has to be restarted after this policy update. 1095 // Returns true if the host has to be restarted after this policy update.
1096 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); 1096 DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
1097 1097
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); 1633 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds));
1634 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); 1634 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog);
1635 1635
1636 // Run the main (also UI) message loop until the host no longer needs it. 1636 // Run the main (also UI) message loop until the host no longer needs it.
1637 message_loop.Run(); 1637 message_loop.Run();
1638 1638
1639 return exit_code; 1639 return exit_code;
1640 } 1640 }
1641 1641
1642 } // namespace remoting 1642 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/it2me/it2me_host.cc ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698