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

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/lkgr 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const content::LoadCommittedDetails& details, 144 const content::LoadCommittedDetails& details,
145 const content::FrameNavigateParams& params) OVERRIDE { 145 const content::FrameNavigateParams& params) OVERRIDE {
146 if (IsSimilarUrl(params.url, cloud_print_url_)) { 146 if (IsSimilarUrl(params.url, cloud_print_url_)) {
147 base::MessageLoop::current()->PostTask( 147 base::MessageLoop::current()->PostTask(
148 FROM_HERE, 148 FROM_HERE,
149 base::Bind(&SignInObserver::OnSignIn, 149 base::Bind(&SignInObserver::OnSignIn,
150 weak_ptr_factory_.GetWeakPtr())); 150 weak_ptr_factory_.GetWeakPtr()));
151 } 151 }
152 } 152 }
153 153
154 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE { 154 virtual void WebContentsDestroyed() OVERRIDE {
155 delete this; 155 delete this;
156 } 156 }
157 157
158 void OnSignIn() { 158 void OnSignIn() {
159 callback_.Run(); 159 callback_.Run();
160 if (web_contents()) 160 if (web_contents())
161 web_contents()->Close(); 161 web_contents()->Close();
162 } 162 }
163 163
164 GURL cloud_print_url_; 164 GURL cloud_print_url_;
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 761
762 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, 762 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL,
763 cloud_print_file, print_job_title, print_job_print_ticket, file_type); 763 cloud_print_file, print_job_title, print_job_print_ticket, file_type);
764 return true; 764 return true;
765 } 765 }
766 } 766 }
767 return false; 767 return false;
768 } 768 }
769 769
770 } // namespace print_dialog_cloud 770 } // namespace print_dialog_cloud
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698