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

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

Issue 1038573002: Fixed thread-unsafe use of gfx::Image in app shortcut creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 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
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/ui/app_list/app_list_view_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "apps/custom_launcher_page_contents.h" 9 #include "apps/custom_launcher_page_contents.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } // namespace chrome 86 } // namespace chrome
87 87
88 namespace { 88 namespace {
89 89
90 const int kAutoLaunchDefaultTimeoutMilliSec = 50; 90 const int kAutoLaunchDefaultTimeoutMilliSec = 50;
91 91
92 #if defined(OS_WIN) 92 #if defined(OS_WIN)
93 void CreateShortcutInWebAppDir( 93 void CreateShortcutInWebAppDir(
94 const base::FilePath& app_data_dir, 94 const base::FilePath& app_data_dir,
95 base::Callback<void(const base::FilePath&)> callback, 95 base::Callback<void(const base::FilePath&)> callback,
96 const web_app::ShortcutInfo& info) { 96 scoped_ptr<web_app::ShortcutInfo> info) {
97 content::BrowserThread::PostTaskAndReplyWithResult( 97 content::BrowserThread::PostTaskAndReplyWithResult(
98 content::BrowserThread::FILE, 98 content::BrowserThread::FILE, FROM_HERE,
99 FROM_HERE, 99 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir,
100 base::Bind(web_app::CreateShortcutInWebAppDir, app_data_dir, info), 100 base::Passed(&info)),
101 callback); 101 callback);
102 } 102 }
103 #endif 103 #endif
104 104
105 void PopulateUsers(const ProfileInfoCache& profile_info, 105 void PopulateUsers(const ProfileInfoCache& profile_info,
106 const base::FilePath& active_profile_path, 106 const base::FilePath& active_profile_path,
107 app_list::AppListViewDelegate::Users* users) { 107 app_list::AppListViewDelegate::Users* users) {
108 users->clear(); 108 users->clear();
109 const size_t count = profile_info.GetNumberOfProfiles(); 109 const size_t count = profile_info.GetNumberOfProfiles();
110 for (size_t i = 0; i < count; ++i) { 110 for (size_t i = 0; i < count; ++i) {
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 845
846 // SigninManagerFactory is not a leaky singleton (unlike this class), and 846 // SigninManagerFactory is not a leaky singleton (unlike this class), and
847 // its destructor will check that it has no remaining observers. 847 // its destructor will check that it has no remaining observers.
848 scoped_observer_.RemoveAll(); 848 scoped_observer_.RemoveAll();
849 SigninManagerFactory::GetInstance()->RemoveObserver(this); 849 SigninManagerFactory::GetInstance()->RemoveObserver(this);
850 break; 850 break;
851 default: 851 default:
852 NOTREACHED(); 852 NOTREACHED();
853 } 853 }
854 } 854 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698