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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 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 | « no previous file | chrome/browser/extensions/extension_cookies_api.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "app/message_box_flags.h" 7 #include "app/message_box_flags.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } 555 }
556 556
557 void TestingAutomationProvider::DeleteCookie(const GURL& url, 557 void TestingAutomationProvider::DeleteCookie(const GURL& url,
558 const std::string& cookie_name, 558 const std::string& cookie_name,
559 int handle, bool* success) { 559 int handle, bool* success) {
560 *success = false; 560 *success = false;
561 if (url.is_valid() && tab_tracker_->ContainsHandle(handle)) { 561 if (url.is_valid() && tab_tracker_->ContainsHandle(handle)) {
562 NavigationController* tab = tab_tracker_->GetResource(handle); 562 NavigationController* tab = tab_tracker_->GetResource(handle);
563 BrowserThread::PostTask( 563 BrowserThread::PostTask(
564 BrowserThread::IO, FROM_HERE, 564 BrowserThread::IO, FROM_HERE,
565 new DeleteCookieTask(url, cookie_name, 565 new DeleteCookieTask(
566 tab->profile()->GetRequestContext())); 566 url, cookie_name,
567 make_scoped_refptr(tab->profile()->GetRequestContext())));
567 *success = true; 568 *success = true;
568 } 569 }
569 } 570 }
570 571
571 void TestingAutomationProvider::ShowCollectedCookiesDialog( 572 void TestingAutomationProvider::ShowCollectedCookiesDialog(
572 int handle, bool* success) { 573 int handle, bool* success) {
573 *success = false; 574 *success = false;
574 if (tab_tracker_->ContainsHandle(handle)) { 575 if (tab_tracker_->ContainsHandle(handle)) {
575 TabContents* tab_contents = 576 TabContents* tab_contents =
576 tab_tracker_->GetResource(handle)->tab_contents(); 577 tab_tracker_->GetResource(handle)->tab_contents();
(...skipping 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after
4211 DCHECK(type == NotificationType::SESSION_END); 4212 DCHECK(type == NotificationType::SESSION_END);
4212 // OnBrowserRemoved does a ReleaseLater. When session end is received we exit 4213 // OnBrowserRemoved does a ReleaseLater. When session end is received we exit
4213 // before the task runs resulting in this object not being deleted. This 4214 // before the task runs resulting in this object not being deleted. This
4214 // Release balance out the Release scheduled by OnBrowserRemoved. 4215 // Release balance out the Release scheduled by OnBrowserRemoved.
4215 Release(); 4216 Release();
4216 } 4217 }
4217 4218
4218 void TestingAutomationProvider::OnRemoveProvider() { 4219 void TestingAutomationProvider::OnRemoveProvider() {
4219 AutomationProviderList::GetInstance()->RemoveProvider(this); 4220 AutomationProviderList::GetInstance()->RemoveProvider(this);
4220 } 4221 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_cookies_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698