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

Side by Side Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 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
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/printing/print_dialog_cloud.h" 5 #include "chrome/browser/printing/print_dialog_cloud.h"
6 6
7 7
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 const content::LoadCommittedDetails& details, 143 const content::LoadCommittedDetails& details,
144 const content::FrameNavigateParams& params) OVERRIDE { 144 const content::FrameNavigateParams& params) OVERRIDE {
145 if (IsSimilarUrl(params.url, cloud_print_url_)) { 145 if (IsSimilarUrl(params.url, cloud_print_url_)) {
146 base::MessageLoop::current()->PostTask( 146 base::MessageLoop::current()->PostTask(
147 FROM_HERE, 147 FROM_HERE,
148 base::Bind(&SignInObserver::OnSignIn, 148 base::Bind(&SignInObserver::OnSignIn,
149 weak_ptr_factory_.GetWeakPtr())); 149 weak_ptr_factory_.GetWeakPtr()));
150 } 150 }
151 } 151 }
152 152
153 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { 153 virtual void WebContentsDestroyed() OVERRIDE {
154 delete this; 154 delete this;
155 } 155 }
156 156
157 void OnSignIn() { 157 void OnSignIn() {
158 callback_.Run(); 158 callback_.Run();
159 if (web_contents()) 159 if (web_contents())
160 web_contents()->Close(); 160 web_contents()->Close();
161 } 161 }
162 162
163 GURL cloud_print_url_; 163 GURL cloud_print_url_;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 759
760 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, 760 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL,
761 cloud_print_file, print_job_title, print_job_print_ticket, file_type); 761 cloud_print_file, print_job_title, print_job_print_ticket, file_type);
762 return true; 762 return true;
763 } 763 }
764 } 764 }
765 return false; 765 return false;
766 } 766 }
767 767
768 } // namespace print_dialog_cloud 768 } // namespace print_dialog_cloud
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698