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

Side by Side Diff: components/profile_service/user_id_map.cc

Issue 1879233002: Move components\profile_service to services\user (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move3
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « components/profile_service/user_id_map.h ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/profile_service/user_id_map.h"
6
7 #include <map>
8
9 #include "base/lazy_instance.h"
10
11 namespace profile {
12
13 namespace {
14 base::LazyInstance<std::map<std::string, base::FilePath>>
15 g_user_id_to_data_dir = LAZY_INSTANCE_INITIALIZER;
16 } // namespace
17
18 void AssociateMojoUserIDWithProfileDir(const std::string& user_id,
19 const base::FilePath& profile_data_dir) {
20 g_user_id_to_data_dir.Get()[user_id] = profile_data_dir;
21 }
22
23 base::FilePath GetProfileDirForUserID(const std::string& user_id) {
24 auto it = g_user_id_to_data_dir.Get().find(user_id);
25 DCHECK(it != g_user_id_to_data_dir.Get().end());
26 return it->second;
27 }
28
29 } // namespace profile
OLDNEW
« no previous file with comments | « components/profile_service/user_id_map.h ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698