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

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

Issue 6969009: Reduced the lifetime of DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stupid clang! Created 9 years, 7 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/ui/views/download/download_item_view.cc ('k') | chrome/chrome_browser.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/imageburner_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/imageburner_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 606 }
607 607
608 void ImageBurnResourceManager::ModelChanged() { 608 void ImageBurnResourceManager::ModelChanged() {
609 std::vector<DownloadItem*> downloads; 609 std::vector<DownloadItem*> downloads;
610 download_manager_->GetTemporaryDownloads(GetImageDir(), &downloads); 610 download_manager_->GetTemporaryDownloads(GetImageDir(), &downloads);
611 if (download_item_observer_added_) 611 if (download_item_observer_added_)
612 return; 612 return;
613 for (std::vector<DownloadItem*>::const_iterator it = downloads.begin(); 613 for (std::vector<DownloadItem*>::const_iterator it = downloads.begin();
614 it != downloads.end(); 614 it != downloads.end();
615 ++it) { 615 ++it) {
616 if ((*it)->url() == config_file_url_) { 616 if ((*it)->GetURL() == config_file_url_) {
617 download_item_observer_added_ = true; 617 download_item_observer_added_ = true;
618 (*it)->AddObserver(this); 618 (*it)->AddObserver(this);
619 active_download_item_ = *it; 619 active_download_item_ = *it;
620 break; 620 break;
621 } 621 }
622 } 622 }
623 } 623 }
624 624
625 void ImageBurnResourceManager::OnDownloadStarted(bool success) { 625 void ImageBurnResourceManager::OnDownloadStarted(bool success) {
626 if (!success) 626 if (!success)
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 // 814 //
815 // ImageBurnUI 815 // ImageBurnUI
816 // 816 //
817 //////////////////////////////////////////////////////////////////////////////// 817 ////////////////////////////////////////////////////////////////////////////////
818 ImageBurnUI::ImageBurnUI(TabContents* contents) : WebUI(contents) { 818 ImageBurnUI::ImageBurnUI(TabContents* contents) : WebUI(contents) {
819 ImageBurnHandler* handler = new ImageBurnHandler(contents); 819 ImageBurnHandler* handler = new ImageBurnHandler(contents);
820 AddMessageHandler((handler)->Attach(this)); 820 AddMessageHandler((handler)->Attach(this));
821 ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource(); 821 ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource();
822 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 822 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
823 } 823 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698