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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc

Issue 1067593005: Fix race conditions in ImageDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use TestBrowserThreadBundle, cleanup tests 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
« no previous file with comments | « chrome/browser/ui/app_list/search/common/url_icon_source.cc ('k') | chrome/chrome_tests.gypi » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/webui/options/chromeos/change_picture_options_handle r.h" 5 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle r.h"
6 6
7 #include "ash/audio/sounds.h" 7 #include "ash/audio/sounds.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 return file_type_info; 71 return file_type_info;
72 } 72 }
73 73
74 // Time histogram suffix for profile image download. 74 // Time histogram suffix for profile image download.
75 const char kProfileDownloadReason[] = "Preferences"; 75 const char kProfileDownloadReason[] = "Preferences";
76 76
77 } // namespace 77 } // namespace
78 78
79 ChangePictureOptionsHandler::ChangePictureOptionsHandler() 79 ChangePictureOptionsHandler::ChangePictureOptionsHandler()
80 : ImageRequest( 80 : previous_image_url_(url::kAboutBlankURL),
81 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)),
82 previous_image_url_(url::kAboutBlankURL),
83 previous_image_index_(user_manager::User::USER_IMAGE_INVALID) { 81 previous_image_index_(user_manager::User::USER_IMAGE_INVALID) {
84 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED, 82 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED,
85 content::NotificationService::AllSources()); 83 content::NotificationService::AllSources());
86 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED, 84 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED,
87 content::NotificationService::AllSources()); 85 content::NotificationService::AllSources());
88 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, 86 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
89 content::NotificationService::AllSources()); 87 content::NotificationService::AllSources());
90 88
91 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 89 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
92 media::SoundsManager* manager = media::SoundsManager::Get(); 90 media::SoundsManager* manager = media::SoundsManager::Get();
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Profile* profile = Profile::FromWebUI(web_ui()); 463 Profile* profile = Profile::FromWebUI(web_ui());
466 const user_manager::User* user = 464 const user_manager::User* user =
467 ProfileHelper::Get()->GetUserByProfile(profile); 465 ProfileHelper::Get()->GetUserByProfile(profile);
468 if (!user) 466 if (!user)
469 return user_manager::UserManager::Get()->GetActiveUser(); 467 return user_manager::UserManager::Get()->GetActiveUser();
470 return user; 468 return user;
471 } 469 }
472 470
473 } // namespace options 471 } // namespace options
474 } // namespace chromeos 472 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/common/url_icon_source.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698