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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit 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
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 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 int handle, 1542 int handle,
1543 std::string* bookmarks_as_json, 1543 std::string* bookmarks_as_json,
1544 bool *success) { 1544 bool *success) {
1545 *success = false; 1545 *success = false;
1546 if (browser_tracker_->ContainsHandle(handle)) { 1546 if (browser_tracker_->ContainsHandle(handle)) {
1547 Browser* browser = browser_tracker_->GetResource(handle); 1547 Browser* browser = browser_tracker_->GetResource(handle);
1548 if (browser) { 1548 if (browser) {
1549 if (!browser->profile()->GetBookmarkModel()->IsLoaded()) { 1549 if (!browser->profile()->GetBookmarkModel()->IsLoaded()) {
1550 return; 1550 return;
1551 } 1551 }
1552 scoped_refptr<BookmarkStorage> storage = new BookmarkStorage( 1552 scoped_refptr<BookmarkStorage> storage(new BookmarkStorage(
1553 browser->profile(), 1553 browser->profile(),
1554 browser->profile()->GetBookmarkModel()); 1554 browser->profile()->GetBookmarkModel()));
1555 *success = storage->SerializeData(bookmarks_as_json); 1555 *success = storage->SerializeData(bookmarks_as_json);
1556 } 1556 }
1557 } 1557 }
1558 } 1558 }
1559 1559
1560 void TestingAutomationProvider::WaitForBookmarkModelToLoad( 1560 void TestingAutomationProvider::WaitForBookmarkModelToLoad(
1561 int handle, 1561 int handle,
1562 IPC::Message* reply_message) { 1562 IPC::Message* reply_message) {
1563 if (browser_tracker_->ContainsHandle(handle)) { 1563 if (browser_tracker_->ContainsHandle(handle)) {
1564 Browser* browser = browser_tracker_->GetResource(handle); 1564 Browser* browser = browser_tracker_->GetResource(handle);
(...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after
4211 DCHECK(type == NotificationType::SESSION_END); 4211 DCHECK(type == NotificationType::SESSION_END);
4212 // OnBrowserRemoved does a ReleaseLater. When session end is received we exit 4212 // OnBrowserRemoved does a ReleaseLater. When session end is received we exit
4213 // before the task runs resulting in this object not being deleted. This 4213 // before the task runs resulting in this object not being deleted. This
4214 // Release balance out the Release scheduled by OnBrowserRemoved. 4214 // Release balance out the Release scheduled by OnBrowserRemoved.
4215 Release(); 4215 Release();
4216 } 4216 }
4217 4217
4218 void TestingAutomationProvider::OnRemoveProvider() { 4218 void TestingAutomationProvider::OnRemoveProvider() {
4219 AutomationProviderList::GetInstance()->RemoveProvider(this); 4219 AutomationProviderList::GetInstance()->RemoveProvider(this);
4220 } 4220 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_resource_message_filter.cc ('k') | chrome/browser/bookmarks/bookmark_html_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698