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

Side by Side Diff: chrome/browser/chromeos/login/authenticator.h

Issue 10443125: Allow re-enrollment to the same domain in case of policy data loss. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/login/authenticator.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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // authentication process. 90 // authentication process.
91 Profile* authentication_profile() { return authentication_profile_; } 91 Profile* authentication_profile() { return authentication_profile_; }
92 92
93 // Perform basic canonicalization of |email_address|, taking into account 93 // Perform basic canonicalization of |email_address|, taking into account
94 // that gmail does not consider '.' or caps inside a username to matter. 94 // that gmail does not consider '.' or caps inside a username to matter.
95 // It also ignores everything after a '+'. 95 // It also ignores everything after a '+'.
96 // For example, c.masone+abc@gmail.com == cMaSone@gmail.com, per 96 // For example, c.masone+abc@gmail.com == cMaSone@gmail.com, per
97 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313# 97 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313#
98 static std::string Canonicalize(const std::string& email_address); 98 static std::string Canonicalize(const std::string& email_address);
99 99
100 // Returns the canonical form of the given domain.
101 static std::string CanonicalizeDomain(const std::string& domain);
102
100 // Sanitize emails. Currently, it only ensures all emails have a domain by 103 // Sanitize emails. Currently, it only ensures all emails have a domain by
101 // adding gmail.com if no domain is present. 104 // adding gmail.com if no domain is present.
102 static std::string Sanitize(const std::string& email_address); 105 static std::string Sanitize(const std::string& email_address);
103 106
107 // Extract the domain part from the canonical form of the given email.
108 static std::string ExtractDomainName(const std::string& email);
109
104 protected: 110 protected:
105 LoginStatusConsumer* consumer_; 111 LoginStatusConsumer* consumer_;
106 Profile* authentication_profile_; 112 Profile* authentication_profile_;
107 113
108 private: 114 private:
109 DISALLOW_COPY_AND_ASSIGN(Authenticator); 115 DISALLOW_COPY_AND_ASSIGN(Authenticator);
110 }; 116 };
111 117
112 } // namespace chromeos 118 } // namespace chromeos
113 119
114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 120 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/login/authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698