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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/parsers/metadata_parser_filebase_unittest.cc ('k') | chrome/browser/rlz/rlz.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/profiles/profile_manager.h" 5 #include "chrome/browser/profiles/profile_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 ProfileInfo* info = NULL; 357 ProfileInfo* info = NULL;
358 358
359 if (iter != profiles_info_.end()) { 359 if (iter != profiles_info_.end()) {
360 info = iter->second.get(); 360 info = iter->second.get();
361 } else { 361 } else {
362 // Initiate asynchronous creation process. 362 // Initiate asynchronous creation process.
363 info = RegisterProfile(CreateProfileAsyncHelper(profile_path, this), false); 363 info = RegisterProfile(CreateProfileAsyncHelper(profile_path, this), false);
364 ProfileInfoCache& cache = GetProfileInfoCache(); 364 ProfileInfoCache& cache = GetProfileInfoCache();
365 // Get the icon index from the user's icon url 365 // Get the icon index from the user's icon url
366 size_t icon_index; 366 size_t icon_index;
367 std::string icon_url_std = UTF16ToASCII(icon_url); 367 std::string icon_url_std = base::UTF16ToASCII(icon_url);
368 if (cache.IsDefaultAvatarIconUrl(icon_url_std, &icon_index)) { 368 if (cache.IsDefaultAvatarIconUrl(icon_url_std, &icon_index)) {
369 // add profile to cache with user selected name and avatar 369 // add profile to cache with user selected name and avatar
370 cache.AddProfileToCache(profile_path, name, base::string16(), icon_index, 370 cache.AddProfileToCache(profile_path, name, base::string16(), icon_index,
371 managed_user_id); 371 managed_user_id);
372 } 372 }
373 373
374 if (!managed_user_id.empty()) { 374 if (!managed_user_id.empty()) {
375 content::RecordAction( 375 content::RecordAction(
376 UserMetricsAction("ManagedMode_LocallyManagedUserCreated")); 376 UserMetricsAction("ManagedMode_LocallyManagedUserCreated"));
377 } 377 }
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 last_non_managed_profile_path.BaseName().MaybeAsASCII()); 1242 last_non_managed_profile_path.BaseName().MaybeAsASCII());
1243 FinishDeletingProfile(profile_to_delete_path); 1243 FinishDeletingProfile(profile_to_delete_path);
1244 } 1244 }
1245 } 1245 }
1246 } 1246 }
1247 #endif 1247 #endif
1248 1248
1249 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1249 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1250 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1250 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1251 } 1251 }
OLDNEW
« no previous file with comments | « chrome/browser/parsers/metadata_parser_filebase_unittest.cc ('k') | chrome/browser/rlz/rlz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698