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

Side by Side Diff: chrome/browser/ui/views/app_list/app_list_controller_win.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 | Annotate | Revision Log
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 <dwmapi.h> 5 #include <dwmapi.h>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "apps/pref_names.h" 8 #include "apps/pref_names.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 // time. 912 // time.
913 const int kInitWindowDelay = 5; 913 const int kInitWindowDelay = 5;
914 base::MessageLoop::current()->PostDelayedTask( 914 base::MessageLoop::current()->PostDelayedTask(
915 FROM_HERE, 915 FROM_HERE,
916 base::Bind(&AppListController::LoadProfileForWarmup, 916 base::Bind(&AppListController::LoadProfileForWarmup,
917 weak_factory_.GetWeakPtr()), 917 weak_factory_.GetWeakPtr()),
918 base::TimeDelta::FromSeconds(kInitWindowDelay)); 918 base::TimeDelta::FromSeconds(kInitWindowDelay));
919 919
920 // Send app list usage stats after a delay. 920 // Send app list usage stats after a delay.
921 const int kSendUsageStatsDelay = 5; 921 const int kSendUsageStatsDelay = 5;
922 MessageLoop::current()->PostDelayedTask( 922 base::MessageLoop::current()->PostDelayedTask(
923 FROM_HERE, 923 FROM_HERE,
924 base::Bind(&AppListController::SendAppListStats), 924 base::Bind(&AppListController::SendAppListStats),
925 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); 925 base::TimeDelta::FromSeconds(kSendUsageStatsDelay));
926 } 926 }
927 927
928 bool AppListController::IsWarmupNeeded() { 928 bool AppListController::IsWarmupNeeded() {
929 if (!g_browser_process || g_browser_process->IsShuttingDown()) 929 if (!g_browser_process || g_browser_process->IsShuttingDown())
930 return false; 930 return false;
931 931
932 // We only need to initialize the view if there's no view already created and 932 // We only need to initialize the view if there's no view already created and
(...skipping 16 matching lines...) Expand all
949 949
950 } // namespace 950 } // namespace
951 951
952 namespace chrome { 952 namespace chrome {
953 953
954 AppListService* GetAppListServiceWin() { 954 AppListService* GetAppListServiceWin() {
955 return AppListController::GetInstance(); 955 return AppListController::GetInstance();
956 } 956 }
957 957
958 } // namespace chrome 958 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698