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

Unified Diff: chrome/browser/internal_auth.h

Issue 10694060: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/idle_query_linux.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/internal_auth.h
diff --git a/chrome/browser/internal_auth.h b/chrome/browser/internal_auth.h
index e372afd0bb7b9cd9cb4d2be619286cb40eb17e5e..c66535749dc1494ff130d5075d528dc95c44639a 100644
--- a/chrome/browser/internal_auth.h
+++ b/chrome/browser/internal_auth.h
@@ -9,14 +9,15 @@
#include <map>
#include <string>
+#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
namespace extensions {
class WebSocketProxyPrivateGetPassportForTCPFunction;
class WebSocketProxyPrivateGetURLForTCPFunction;
-} // namespace extensions
+}
-namespace browser {
+namespace chrome {
// Call InternalAuthVerification methods on any thread.
class InternalAuthVerification {
@@ -28,6 +29,11 @@ class InternalAuthVerification {
const std::map<std::string, std::string>& var_value_map);
private:
+ friend class InternalAuthGeneration;
+ friend class InternalAuthVerificationService;
+ friend class InternalAuthGenerationService;
+ FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ExpirationAndBruteForce);
+
// We allow for easy separation of InternalAuthVerification and
// InternalAuthGeneration so the only thing they share (besides time) is
// a key (regenerated infrequently).
@@ -43,24 +49,12 @@ class InternalAuthVerification {
static int verification_window_seconds_;
- friend class InternalAuthGeneration;
- friend class InternalAuthVerificationService;
- friend class InternalAuthGenerationService;
-
- FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ExpirationAndBruteForce);
+ DISALLOW_IMPLICIT_CONSTRUCTORS(InternalAuthVerification);
};
// Not thread-safe. Make all calls on the same thread (UI thread).
class InternalAuthGeneration {
private:
- // Generates passport; do this only after successful check of credentials.
- static std::string GeneratePassport(
- const std::string& domain,
- const std::map<std::string, std::string>& var_value_map);
-
- // Used only by tests.
- static void GenerateNewKey();
-
friend class extensions::WebSocketProxyPrivateGetPassportForTCPFunction;
friend class extensions::WebSocketProxyPrivateGetURLForTCPFunction;
@@ -71,8 +65,16 @@ class InternalAuthGeneration {
FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BruteForce);
FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ExpirationAndBruteForce);
FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ChangeKey);
+
+ // Generates passport; do this only after successful check of credentials.
+ static std::string GeneratePassport(
+ const std::string& domain,
+ const std::map<std::string, std::string>& var_value_map);
+
+ // Used only by tests.
+ static void GenerateNewKey();
};
-} // namespace browser
+} // namespace chrome
#endif // CHROME_BROWSER_INTERNAL_AUTH_H_
« no previous file with comments | « chrome/browser/idle_query_linux.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698