OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/chrome/browser/browser_state/chrome_browser_state_removal_controll
er.h" | 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_removal_controll
er.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/mac/foundation_util.h" | 13 #include "base/mac/foundation_util.h" |
14 #include "base/strings/sys_string_conversions.h" | 14 #include "base/strings/sys_string_conversions.h" |
15 #include "components/prefs/pref_service.h" | 15 #include "components/prefs/pref_service.h" |
16 #include "google_apis/gaia/gaia_auth_util.h" | 16 #include "google_apis/gaia/gaia_auth_util.h" |
17 #include "ios/chrome/browser/application_context.h" | 17 #include "ios/chrome/browser/application_context.h" |
18 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" | 18 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" |
| 19 #include "ios/chrome/browser/browser_state/chrome_browser_state_manager.h" |
19 #include "ios/chrome/browser/chrome_constants.h" | 20 #include "ios/chrome/browser/chrome_constants.h" |
20 #include "ios/chrome/browser/chrome_paths_internal.h" | 21 #include "ios/chrome/browser/chrome_paths_internal.h" |
21 #include "ios/chrome/browser/pref_names.h" | 22 #include "ios/chrome/browser/pref_names.h" |
22 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state_
manager.h" | |
23 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 23 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
24 #import "ios/public/provider/chrome/browser/signin/chrome_identity.h" | 24 #import "ios/public/provider/chrome/browser/signin/chrome_identity.h" |
25 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" | 25 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" |
26 #include "ios/web/public/web_thread.h" | 26 #include "ios/web/public/web_thread.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 ChromeBrowserStateRemovalController* g_chrome_browser_state_removal_helper = | 30 ChromeBrowserStateRemovalController* g_chrome_browser_state_removal_helper = |
31 nullptr; | 31 nullptr; |
32 | 32 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 std::string ChromeBrowserStateRemovalController::GetLastBrowserStatePathUsed() { | 164 std::string ChromeBrowserStateRemovalController::GetLastBrowserStatePathUsed() { |
165 return GetApplicationContext()->GetLocalState()->GetString( | 165 return GetApplicationContext()->GetLocalState()->GetString( |
166 prefs::kBrowserStateLastUsed); | 166 prefs::kBrowserStateLastUsed); |
167 } | 167 } |
168 | 168 |
169 void ChromeBrowserStateRemovalController::SetLastBrowserStatePathUsed( | 169 void ChromeBrowserStateRemovalController::SetLastBrowserStatePathUsed( |
170 const std::string& browser_state_path) { | 170 const std::string& browser_state_path) { |
171 GetApplicationContext()->GetLocalState()->SetString( | 171 GetApplicationContext()->GetLocalState()->SetString( |
172 prefs::kBrowserStateLastUsed, browser_state_path); | 172 prefs::kBrowserStateLastUsed, browser_state_path); |
173 } | 173 } |
OLD | NEW |