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

Side by Side Diff: chrome/browser/internal_auth.h

Issue 10445013: Moving web_socket_proxy_private into a sub-dir in api/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing the order of lines around end-of-header-guard Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_INTERNAL_AUTH_H_ 5 #ifndef CHROME_BROWSER_INTERNAL_AUTH_H_
6 #define CHROME_BROWSER_INTERNAL_AUTH_H_ 6 #define CHROME_BROWSER_INTERNAL_AUTH_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 11
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 13
14 namespace extensions {
14 class WebSocketProxyPrivateGetPassportForTCPFunction; 15 class WebSocketProxyPrivateGetPassportForTCPFunction;
15 class WebSocketProxyPrivateGetURLForTCPFunction; 16 class WebSocketProxyPrivateGetURLForTCPFunction;
17 } // namespace extensions
16 18
17 namespace browser { 19 namespace browser {
18 20
19 // Call InternalAuthVerification methods on any thread. 21 // Call InternalAuthVerification methods on any thread.
20 class InternalAuthVerification { 22 class InternalAuthVerification {
21 public: 23 public:
22 // Used by consumer of passport in order to verify credentials. 24 // Used by consumer of passport in order to verify credentials.
23 static bool VerifyPassport( 25 static bool VerifyPassport(
24 const std::string& passport, 26 const std::string& passport,
25 const std::string& domain, 27 const std::string& domain,
(...skipping 26 matching lines...) Expand all
52 class InternalAuthGeneration { 54 class InternalAuthGeneration {
53 private: 55 private:
54 // Generates passport; do this only after successful check of credentials. 56 // Generates passport; do this only after successful check of credentials.
55 static std::string GeneratePassport( 57 static std::string GeneratePassport(
56 const std::string& domain, 58 const std::string& domain,
57 const std::map<std::string, std::string>& var_value_map); 59 const std::map<std::string, std::string>& var_value_map);
58 60
59 // Used only by tests. 61 // Used only by tests.
60 static void GenerateNewKey(); 62 static void GenerateNewKey();
61 63
62 friend class ::WebSocketProxyPrivateGetPassportForTCPFunction; 64 friend class extensions::WebSocketProxyPrivateGetPassportForTCPFunction;
63 friend class ::WebSocketProxyPrivateGetURLForTCPFunction; 65 friend class extensions::WebSocketProxyPrivateGetURLForTCPFunction;
64 66
65 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BasicGeneration); 67 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BasicGeneration);
66 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, DoubleGeneration); 68 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, DoubleGeneration);
67 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BadGeneration); 69 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BadGeneration);
68 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BasicVerification); 70 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BasicVerification);
69 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BruteForce); 71 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, BruteForce);
70 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ExpirationAndBruteForce); 72 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ExpirationAndBruteForce);
71 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ChangeKey); 73 FRIEND_TEST_ALL_PREFIXES(InternalAuthTest, ChangeKey);
72 }; 74 };
73 75
74 } // namespace browser 76 } // namespace browser
75 77
76 #endif // CHROME_BROWSER_INTERNAL_AUTH_H_ 78 #endif // CHROME_BROWSER_INTERNAL_AUTH_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_socket_proxy_private_apitest.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698