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

Side by Side Diff: chrome/browser/importer/external_process_importer_host.cc

Issue 1097083004: [chrome/browser/e*-i*] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/geolocation/chrome_access_token_store.cc ('k') | no next file » | 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) 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/importer/external_process_importer_host.h" 5 #include "chrome/browser/importer/external_process_importer_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/importer/external_process_importer_client.h" 10 #include "chrome/browser/importer/external_process_importer_client.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 observer_->ImportItemStarted(item); 77 observer_->ImportItemStarted(item);
78 } 78 }
79 79
80 void ExternalProcessImporterHost::NotifyImportItemEnded( 80 void ExternalProcessImporterHost::NotifyImportItemEnded(
81 importer::ImportItem item) { 81 importer::ImportItem item) {
82 if (observer_) 82 if (observer_)
83 observer_->ImportItemEnded(item); 83 observer_->ImportItemEnded(item);
84 } 84 }
85 85
86 void ExternalProcessImporterHost::NotifyImportEnded() { 86 void ExternalProcessImporterHost::NotifyImportEnded() {
87 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 87 DCHECK_CURRENTLY_ON(BrowserThread::UI);
88 firefox_lock_.reset(); 88 firefox_lock_.reset();
89 if (observer_) 89 if (observer_)
90 observer_->ImportEnded(); 90 observer_->ImportEnded();
91 delete this; 91 delete this;
92 } 92 }
93 93
94 ExternalProcessImporterHost::~ExternalProcessImporterHost() { 94 ExternalProcessImporterHost::~ExternalProcessImporterHost() {
95 if (installed_bookmark_observer_) { 95 if (installed_bookmark_observer_) {
96 DCHECK(profile_); 96 DCHECK(profile_);
97 BookmarkModelFactory::GetForProfile(profile_)->RemoveObserver(this); 97 BookmarkModelFactory::GetForProfile(profile_)->RemoveObserver(this);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (!writer_->TemplateURLServiceIsLoaded()) { 204 if (!writer_->TemplateURLServiceIsLoaded()) {
205 TemplateURLService* model = 205 TemplateURLService* model =
206 TemplateURLServiceFactory::GetForProfile(profile_); 206 TemplateURLServiceFactory::GetForProfile(profile_);
207 template_service_subscription_ = model->RegisterOnLoadedCallback( 207 template_service_subscription_ = model->RegisterOnLoadedCallback(
208 base::Bind(&ExternalProcessImporterHost::OnTemplateURLServiceLoaded, 208 base::Bind(&ExternalProcessImporterHost::OnTemplateURLServiceLoaded,
209 weak_ptr_factory_.GetWeakPtr())); 209 weak_ptr_factory_.GetWeakPtr()));
210 model->Load(); 210 model->Load();
211 } 211 }
212 } 212 }
213 } 213 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/chrome_access_token_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698