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

Side by Side Diff: chrome/browser/chromeos/customization/customization_document.cc

Issue 1036723003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/chromeos/customization/customization_document.h" 5 #include "chrome/browser/chromeos/customization/customization_document.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } else { 532 } else {
533 StartFileFetch(); 533 StartFileFetch();
534 } 534 }
535 } 535 }
536 } 536 }
537 537
538 // static 538 // static
539 void ServicesCustomizationDocument::ReadFileInBackground( 539 void ServicesCustomizationDocument::ReadFileInBackground(
540 base::WeakPtr<ServicesCustomizationDocument> self, 540 base::WeakPtr<ServicesCustomizationDocument> self,
541 const base::FilePath& file) { 541 const base::FilePath& file) {
542 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 542 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
543 543
544 std::string manifest; 544 std::string manifest;
545 if (!base::ReadFileToString(file, &manifest)) { 545 if (!base::ReadFileToString(file, &manifest)) {
546 manifest.clear(); 546 manifest.clear();
547 LOG(ERROR) << "Failed to load services customization manifest from: " 547 LOG(ERROR) << "Failed to load services customization manifest from: "
548 << file.value(); 548 << file.value();
549 } 549 }
550 550
551 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 551 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
552 base::Bind(&ServicesCustomizationDocument::OnManifesteRead, 552 base::Bind(&ServicesCustomizationDocument::OnManifesteRead,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 base::Passed(applying.Pass())); 867 base::Passed(applying.Pass()));
868 if (!content::BrowserThread::PostBlockingPoolTaskAndReply( 868 if (!content::BrowserThread::PostBlockingPoolTaskAndReply(
869 FROM_HERE, check_file_exists, on_checked_closure)) { 869 FROM_HERE, check_file_exists, on_checked_closure)) {
870 LOG(WARNING) << "Failed to start check Wallpaper cache exists."; 870 LOG(WARNING) << "Failed to start check Wallpaper cache exists.";
871 } 871 }
872 } 872 }
873 873
874 void ServicesCustomizationDocument::OnCheckedWallpaperCacheExists( 874 void ServicesCustomizationDocument::OnCheckedWallpaperCacheExists(
875 scoped_ptr<bool> exists, 875 scoped_ptr<bool> exists,
876 scoped_ptr<ServicesCustomizationDocument::ApplyingTask> applying) { 876 scoped_ptr<ServicesCustomizationDocument::ApplyingTask> applying) {
877 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 877 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
878 DCHECK(exists); 878 DCHECK(exists);
879 DCHECK(applying); 879 DCHECK(applying);
880 880
881 ApplyWallpaper(*exists, applying.Pass()); 881 ApplyWallpaper(*exists, applying.Pass());
882 } 882 }
883 883
884 void ServicesCustomizationDocument::ApplyWallpaper( 884 void ServicesCustomizationDocument::ApplyWallpaper(
885 bool default_wallpaper_file_exists, 885 bool default_wallpaper_file_exists,
886 scoped_ptr<ServicesCustomizationDocument::ApplyingTask> applying) { 886 scoped_ptr<ServicesCustomizationDocument::ApplyingTask> applying) {
887 GURL wallpaper_url; 887 GURL wallpaper_url;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 apply_tasks_success_ += success; 957 apply_tasks_success_ += success;
958 958
959 if (apply_tasks_started_ != apply_tasks_finished_) 959 if (apply_tasks_started_ != apply_tasks_finished_)
960 return; 960 return;
961 961
962 if (apply_tasks_success_ == apply_tasks_finished_) 962 if (apply_tasks_success_ == apply_tasks_finished_)
963 SetApplied(true); 963 SetApplied(true);
964 } 964 }
965 965
966 } // namespace chromeos 966 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/camera_detector.cc ('k') | chrome/browser/chromeos/device/input_service_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698