Commit d5f614c2 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Move ChromeBrowserState to global namespace

Move ChromeBrowserState to the global namespace and add "using"
to also make it accessible through the "ios" namespace. Change
the forward declaration in chrome_browser_state_forward.h to
also use the same pattern.

Bug: 1042208
Change-Id: I721e2e6976bce5110724f66b0dfa3edd8acdfd37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014913
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734497}
parent 61a7639a
...@@ -35,8 +35,6 @@ namespace web { ...@@ -35,8 +35,6 @@ namespace web {
class WebUIIOS; class WebUIIOS;
} }
namespace ios {
enum class ChromeBrowserStateType { enum class ChromeBrowserStateType {
REGULAR_BROWSER_STATE, REGULAR_BROWSER_STATE,
INCOGNITO_BROWSER_STATE, INCOGNITO_BROWSER_STATE,
...@@ -133,6 +131,9 @@ class ChromeBrowserState : public web::BrowserState { ...@@ -133,6 +131,9 @@ class ChromeBrowserState : public web::BrowserState {
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState);
}; };
namespace ios {
using ::ChromeBrowserState;
using ::ChromeBrowserStateType;
} // namespace ios } // namespace ios
#endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#error "This file requires ARC support." #error "This file requires ARC support."
#endif #endif
namespace ios {
namespace { namespace {
// All ChromeBrowserState will store a dummy base::SupportsUserData::Data // All ChromeBrowserState will store a dummy base::SupportsUserData::Data
// object with this key. It can be used to check that a web::BrowserState // object with this key. It can be used to check that a web::BrowserState
...@@ -95,5 +94,3 @@ void ChromeBrowserState::UpdateCorsExemptHeader( ...@@ -95,5 +94,3 @@ void ChromeBrowserState::UpdateCorsExemptHeader(
network::mojom::NetworkContextParams* params) { network::mojom::NetworkContextParams* params) {
variations::UpdateCorsExemptHeaderForVariations(params); variations::UpdateCorsExemptHeaderForVariations(params);
} }
} // namespace ios
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
// This file is there to help move ios::ChromeBrowserState to the global // This file is there to help move ios::ChromeBrowserState to the global
// namespace (i.e. rename it to ChromeBrowserState). // namespace (i.e. rename it to ChromeBrowserState).
namespace ios {
class ChromeBrowserState; class ChromeBrowserState;
enum class ChromeBrowserStateType; enum class ChromeBrowserStateType;
namespace ios {
using ::ChromeBrowserState;
using ::ChromeBrowserStateType;
} // namespace ios } // namespace ios
#endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_FORWARD_H_ #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_FORWARD_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment