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

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: Moved the domain extraction to Authenticator and added custom error message. 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Sanitize emails. Currently, it only ensures all emails have a domain by 100 // Sanitize emails. Currently, it only ensures all emails have a domain by
101 // adding gmail.com if no domain is present. 101 // adding gmail.com if no domain is present.
102 static std::string Sanitize(const std::string& email_address); 102 static std::string Sanitize(const std::string& email_address);
103 103
104 // Extract the domain part from the canonical form of the given email.
105 static std::string ExtractDomainName(const std::string& email);
106
104 protected: 107 protected:
105 LoginStatusConsumer* consumer_; 108 LoginStatusConsumer* consumer_;
106 Profile* authentication_profile_; 109 Profile* authentication_profile_;
107 110
108 private: 111 private:
109 DISALLOW_COPY_AND_ASSIGN(Authenticator); 112 DISALLOW_COPY_AND_ASSIGN(Authenticator);
110 }; 113 };
111 114
112 } // namespace chromeos 115 } // namespace chromeos
113 116
114 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 117 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698