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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_impl.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/app_list/app_list_service_impl.h" 5 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
6 6
7 #include <string> 7 #include <string>
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 void LoadProfileAsync(const base::FilePath& path, 94 void LoadProfileAsync(const base::FilePath& path,
95 base::Callback<void(Profile*)> callback) override { 95 base::Callback<void(Profile*)> callback) override {
96 profile_manager_->CreateProfileAsync( 96 profile_manager_->CreateProfileAsync(
97 path, 97 path,
98 base::Bind(&ProfileStoreImpl::OnProfileCreated, 98 base::Bind(&ProfileStoreImpl::OnProfileCreated,
99 weak_factory_.GetWeakPtr(), 99 weak_factory_.GetWeakPtr(),
100 callback), 100 callback),
101 base::string16(), 101 base::string16(),
102 base::string16(), 102 base::string16(),
103 std::string()); 103 user_manager::UserID(std::string(), std::string()));
104 } 104 }
105 105
106 void OnProfileCreated(base::Callback<void(Profile*)> callback, 106 void OnProfileCreated(base::Callback<void(Profile*)> callback,
107 Profile* profile, 107 Profile* profile,
108 Profile::CreateStatus status) { 108 Profile::CreateStatus status) {
109 switch (status) { 109 switch (status) {
110 case Profile::CREATE_STATUS_CREATED: 110 case Profile::CREATE_STATUS_CREATED:
111 break; 111 break;
112 case Profile::CREATE_STATUS_INITIALIZED: 112 case Profile::CREATE_STATUS_INITIALIZED:
113 callback.Run(profile); 113 callback.Run(profile);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (!base::MessageLoop::current()) 446 if (!base::MessageLoop::current())
447 return; // In a unit test. 447 return; // In a unit test.
448 448
449 // Send app list usage stats after a delay. 449 // Send app list usage stats after a delay.
450 const int kSendUsageStatsDelay = 5; 450 const int kSendUsageStatsDelay = 5;
451 base::MessageLoop::current()->PostDelayedTask( 451 base::MessageLoop::current()->PostDelayedTask(
452 FROM_HERE, 452 FROM_HERE,
453 base::Bind(&AppListServiceImpl::SendAppListStats), 453 base::Bind(&AppListServiceImpl::SendAppListStats),
454 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); 454 base::TimeDelta::FromSeconds(kSendUsageStatsDelay));
455 } 455 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698