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

Side by Side Diff: chrome/browser/external_tab_container.cc

Issue 332006: Remove the restriction that ChromeURLRequestContextGetter needs to be release... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to latest changes Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/automation/automation_profile_impl.cc ('k') | chrome/browser/profile.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/external_tab_container.h" 5 #include "chrome/browser/external_tab_container.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/win_util.h" 10 #include "app/win_util.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 NotificationService::current()->Notify( 166 NotificationService::current()->Notify(
167 NotificationType::EXTERNAL_TAB_CLOSED, 167 NotificationType::EXTERNAL_TAB_CLOSED,
168 Source<NavigationController>(&tab_contents_->controller()), 168 Source<NavigationController>(&tab_contents_->controller()),
169 Details<ExternalTabContainer>(this)); 169 Details<ExternalTabContainer>(this));
170 170
171 delete tab_contents_; 171 delete tab_contents_;
172 tab_contents_ = NULL; 172 tab_contents_ = NULL;
173 } 173 }
174 174
175 if (request_context_.get()) { 175 request_context_ = NULL;
176 AutomationRequestContext::CleanupRequestContext(
177 request_context_.release());
178 }
179 } 176 }
180 177
181 bool ExternalTabContainer::Reinitialize( 178 bool ExternalTabContainer::Reinitialize(
182 AutomationProvider* automation_provider, 179 AutomationProvider* automation_provider,
183 AutomationResourceMessageFilter* filter) { 180 AutomationResourceMessageFilter* filter) {
184 if (!automation_provider || !filter) { 181 if (!automation_provider || !filter) {
185 NOTREACHED(); 182 NOTREACHED();
186 return false; 183 return false;
187 } 184 }
188 185
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 automation_->Send(new AutomationMsg_RequestGoToHistoryEntryOffset( 689 automation_->Send(new AutomationMsg_RequestGoToHistoryEntryOffset(
693 0, tab_handle_, offset)); 690 0, tab_handle_, offset));
694 return false; 691 return false;
695 } 692 }
696 693
697 return true; 694 return true;
698 } 695 }
699 696
700 void ExternalTabContainer::InitializeAutomationRequestContext( 697 void ExternalTabContainer::InitializeAutomationRequestContext(
701 int tab_handle) { 698 int tab_handle) {
702 if (request_context_.get()) {
703 AutomationRequestContext::CleanupRequestContext(
704 request_context_.release());
705 }
706
707 request_context_ = 699 request_context_ =
708 AutomationRequestContext::CreateAutomationURLRequestContextForTab( 700 AutomationRequestContext::CreateAutomationURLRequestContextForTab(
709 tab_handle, tab_contents_->profile(), 701 tab_handle, tab_contents_->profile(),
710 automation_resource_message_filter_); 702 automation_resource_message_filter_);
711 703
712 DCHECK(request_context_.get() != NULL); 704 DCHECK(request_context_.get() != NULL);
713 tab_contents_->set_request_context(request_context_.get()); 705 tab_contents_->set_request_context(request_context_.get());
714 } 706 }
715 707
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_profile_impl.cc ('k') | chrome/browser/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698