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

Side by Side Diff: chrome/browser/chromeos/imageburner/burn_manager.cc

Issue 9316116: Isolate initiation counts for downloads to their own histograms and improve (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restored curlies to original. Created 8 years, 10 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 "chrome/browser/chromeos/imageburner/burn_manager.h" 5 #include "chrome/browser/chromeos/imageburner/burn_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 WebContents* web_contents, 418 WebContents* web_contents,
419 net::FileStream* file_stream) { 419 net::FileStream* file_stream) {
420 if (file_stream) { 420 if (file_stream) {
421 DownloadManager* download_manager = 421 DownloadManager* download_manager =
422 web_contents->GetBrowserContext()->GetDownloadManager(); 422 web_contents->GetBrowserContext()->GetDownloadManager();
423 DownloadSaveInfo save_info; 423 DownloadSaveInfo save_info;
424 save_info.file_path = file_path; 424 save_info.file_path = file_path;
425 save_info.file_stream = linked_ptr<net::FileStream>(file_stream); 425 save_info.file_stream = linked_ptr<net::FileStream>(file_stream);
426 DownloadStarted(true, url); 426 DownloadStarted(true, url);
427 427
428 download_util::RecordDownloadCount( 428 download_util::RecordDownloadSource(
429 download_util::INITIATED_BY_IMAGE_BURNER_COUNT); 429 download_util::INITIATED_BY_IMAGE_BURNER);
430 download_manager->DownloadUrl( 430 download_manager->DownloadUrl(
431 url, 431 url,
432 web_contents->GetURL(), 432 web_contents->GetURL(),
433 web_contents->GetEncoding(), 433 web_contents->GetEncoding(),
434 false, 434 false,
435 -1, 435 -1,
436 save_info, 436 save_info,
437 web_contents); 437 web_contents);
438 } else { 438 } else {
439 DownloadStarted(false, url); 439 DownloadStarted(false, url);
(...skipping 11 matching lines...) Expand all
451 current_listener != listener_range.second; 451 current_listener != listener_range.second;
452 ++current_listener) { 452 ++current_listener) {
453 if (current_listener->second) 453 if (current_listener->second)
454 current_listener->second->OnBurnDownloadStarted(success); 454 current_listener->second->OnBurnDownloadStarted(success);
455 } 455 }
456 listeners_.erase(listener_range.first, listener_range.second); 456 listeners_.erase(listener_range.first, listener_range.second);
457 } 457 }
458 458
459 } // namespace imageburner 459 } // namespace imageburner
460 } // namespace chromeos 460 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698