| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | 5 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "ios/public/provider/web/web_ui_ios.h" | 8 #include "ios/public/provider/web/web_ui_ios.h" |
| 9 #include "ios/web/public/web_state/web_state.h" | 9 #include "ios/web/public/web_state/web_state.h" |
| 10 | 10 |
| 11 namespace ios { | 11 namespace ios { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 ChromeBrowserState* ChromeBrowserState::FromBrowserState( | 14 ChromeBrowserState* ChromeBrowserState::FromBrowserState( |
| 15 web::BrowserState* browser_state) { | 15 web::BrowserState* browser_state) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 27 // to keep in sync with the meaning on other platforms. | 27 // to keep in sync with the meaning on other platforms. |
| 28 std::string name = | 28 std::string name = |
| 29 GetOriginalChromeBrowserState()->GetStatePath().BaseName().MaybeAsASCII(); | 29 GetOriginalChromeBrowserState()->GetStatePath().BaseName().MaybeAsASCII(); |
| 30 if (name.empty()) { | 30 if (name.empty()) { |
| 31 name = "UnknownBrowserState"; | 31 name = "UnknownBrowserState"; |
| 32 } | 32 } |
| 33 return name; | 33 return name; |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace ios | 36 } // namespace ios |
| OLD | NEW |