summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-09 22:44:31 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-09 22:44:31 +0000
commit6fe7533b6389215887532acc7419a01e004e9ab1 (patch)
treefb3f7f1003c1222cb9d75726d31f236b274e6fc2
parent1891d2af03e278287a3b9502ce8525f7e22c5464 (diff)
downloadchromium_src-6fe7533b6389215887532acc7419a01e004e9ab1.zip
chromium_src-6fe7533b6389215887532acc7419a01e004e9ab1.tar.gz
chromium_src-6fe7533b6389215887532acc7419a01e004e9ab1.tar.bz2
components: Move auto_login_parser into auto_login_parser namespace.
BUG=238220 TBR=boliu@chromium.org, joi@chromium.org Review URL: https://codereview.chromium.org/14630007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199290 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc18
-rw-r--r--chrome/browser/ui/auto_login_infobar_delegate.h4
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc7
-rw-r--r--components/auto_login_parser/auto_login_parser.cc6
-rw-r--r--components/auto_login_parser/auto_login_parser.h8
-rw-r--r--components/auto_login_parser/auto_login_parser_unittest.cc9
6 files changed, 20 insertions, 32 deletions
diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
index 7ec9e847..4c73893 100644
--- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
+++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
@@ -305,18 +305,14 @@ void AwResourceDispatcherHostDelegate::OnResponseStarted(
if (request_info->GetResourceType() == ResourceType::MAIN_FRAME) {
// Check for x-auto-login header.
- components::auto_login::HeaderData header_data;
- if (components::auto_login::ParserHeaderInResponse(
- request,
- components::auto_login::ALLOW_ANY_REALM,
- &header_data)) {
+ auto_login_parser::HeaderData header_data;
+ if (auto_login_parser::ParserHeaderInResponse(
+ request, auto_login_parser::ALLOW_ANY_REALM, &header_data)) {
scoped_ptr<AwContentsIoThreadClient> io_client =
- AwContentsIoThreadClient::FromID(
- request_info->GetChildID(),
- request_info->GetRouteID());
- io_client->NewLoginRequest(header_data.realm,
- header_data.account,
- header_data.args);
+ AwContentsIoThreadClient::FromID(request_info->GetChildID(),
+ request_info->GetRouteID());
+ io_client->NewLoginRequest(
+ header_data.realm, header_data.account, header_data.args);
}
}
}
diff --git a/chrome/browser/ui/auto_login_infobar_delegate.h b/chrome/browser/ui/auto_login_infobar_delegate.h
index fba1fb5..7f5750b 100644
--- a/chrome/browser/ui/auto_login_infobar_delegate.h
+++ b/chrome/browser/ui/auto_login_infobar_delegate.h
@@ -15,7 +15,7 @@ class TokenService;
namespace content {
class NavigationController;
-} // namespace content
+}
// This is the actual infobar displayed to prompt the user to auto-login.
class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
@@ -26,7 +26,7 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
~Params();
// Information from a parsed header.
- components::auto_login::HeaderData header;
+ auto_login_parser::HeaderData header;
// Username to display in the infobar indicating user to be logged in as.
// This is initially fetched from sign-in on non-Android platforms. Note
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 77efa14..4dc3999 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -82,12 +82,9 @@ void AutoLoginPrompter::ShowInfoBarIfPossible(net::URLRequest* request,
// suggest auto-login, if available.
Params params;
// Currently we only accept GAIA credentials in Chrome.
- if (!components::auto_login::ParserHeaderInResponse(
- request,
- components::auto_login::ONLY_GOOGLE_COM,
- &params.header)) {
+ if (!auto_login_parser::ParserHeaderInResponse(
+ request, auto_login_parser::ONLY_GOOGLE_COM, &params.header))
return;
- }
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
diff --git a/components/auto_login_parser/auto_login_parser.cc b/components/auto_login_parser/auto_login_parser.cc
index 7ecbfeb..298c9b7 100644
--- a/components/auto_login_parser/auto_login_parser.cc
+++ b/components/auto_login_parser/auto_login_parser.cc
@@ -12,8 +12,7 @@
#include "net/base/escape.h"
#include "net/url_request/url_request.h"
-namespace components {
-namespace auto_login {
+namespace auto_login_parser {
namespace {
@@ -80,5 +79,4 @@ bool ParserHeaderInResponse(net::URLRequest* request,
return ParseHeader(header_string, realm_restriction, header_data);
}
-} // namespace auto_login
-} // namespace components
+} // namespace auto_login_parser
diff --git a/components/auto_login_parser/auto_login_parser.h b/components/auto_login_parser/auto_login_parser.h
index dd60cbc..bd2f28f 100644
--- a/components/auto_login_parser/auto_login_parser.h
+++ b/components/auto_login_parser/auto_login_parser.h
@@ -9,10 +9,9 @@
namespace net {
class URLRequest;
-} // namespace net
+}
-namespace components {
-namespace auto_login {
+namespace auto_login_parser {
enum RealmRestriction {
ONLY_GOOGLE_COM,
@@ -46,7 +45,6 @@ bool ParserHeaderInResponse(net::URLRequest* request,
RealmRestriction realm_restriction,
HeaderData* header_data);
-} // namespace auto_login
-} // namespace components
+} // namespace auto_login_parser
#endif // COMPONENTS_AUTO_LOGIN_PARSER_AUTO_LOGIN_PARSER_H_
diff --git a/components/auto_login_parser/auto_login_parser_unittest.cc b/components/auto_login_parser/auto_login_parser_unittest.cc
index 3e990ee..442784c 100644
--- a/components/auto_login_parser/auto_login_parser_unittest.cc
+++ b/components/auto_login_parser/auto_login_parser_unittest.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/auto_login_parser/auto_login_parser.h"
+
#include <string>
-#include "components/auto_login_parser/auto_login_parser.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace components {
-namespace auto_login {
+namespace auto_login_parser {
class AutoLoginParserTest : public testing::Test {
protected:
@@ -89,5 +89,4 @@ TEST_F(AutoLoginParserTest, ParseHeaderAllowsAnyRealmWithOption) {
ASSERT_EQ("kfdshfwoeriudslkfsdjfhdskjfhsdkr", header_data.args);
}
-} // namespace auto_login
-} // namespace components
+} // namespace auto_login_parser