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

Side by Side Diff: ios/chrome/browser/browser_state/browser_state_info_cache.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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/browser_state_info_cache.h" 5 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/i18n/case_conversion.h" 11 #include "base/i18n/case_conversion.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/prefs/pref_registry_simple.h"
15 #include "base/prefs/scoped_user_pref_update.h"
14 #include "base/values.h" 16 #include "base/values.h"
15 #include "components/prefs/pref_registry_simple.h"
16 #include "components/prefs/scoped_user_pref_update.h"
17 #include "ios/chrome/browser/browser_state/browser_state_info_cache_observer.h" 17 #include "ios/chrome/browser/browser_state/browser_state_info_cache_observer.h"
18 #include "ios/chrome/browser/pref_names.h" 18 #include "ios/chrome/browser/pref_names.h"
19 19
20 namespace { 20 namespace {
21 const char kGAIAIdKey[] = "gaia_id"; 21 const char kGAIAIdKey[] = "gaia_id";
22 const char kIsAuthErrorKey[] = "is_auth_error"; 22 const char kIsAuthErrorKey[] = "is_auth_error";
23 const char kUserNameKey[] = "user_name"; 23 const char kUserNameKey[] = "user_name";
24 } 24 }
25 25
26 BrowserStateInfoCache::BrowserStateInfoCache( 26 BrowserStateInfoCache::BrowserStateInfoCache(
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const base::FilePath& browser_state_path) const { 200 const base::FilePath& browser_state_path) const {
201 DCHECK(user_data_dir_ == browser_state_path.DirName()); 201 DCHECK(user_data_dir_ == browser_state_path.DirName());
202 base::FilePath base_name = browser_state_path.BaseName(); 202 base::FilePath base_name = browser_state_path.BaseName();
203 return base_name.MaybeAsASCII(); 203 return base_name.MaybeAsASCII();
204 } 204 }
205 205
206 void BrowserStateInfoCache::AddBrowserStateCacheKey(const std::string& key) { 206 void BrowserStateInfoCache::AddBrowserStateCacheKey(const std::string& key) {
207 sorted_keys_.insert( 207 sorted_keys_.insert(
208 std::upper_bound(sorted_keys_.begin(), sorted_keys_.end(), key), key); 208 std::upper_bound(sorted_keys_.begin(), sorted_keys_.end(), key), key);
209 } 209 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/bookmarks/bookmarks_utils.cc ('k') | ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698