Skip to content

Commit

Permalink
Rewrite scoped_ptr<T>(NULL) to use the default ctor in components/.
Browse files Browse the repository at this point in the history
This is the result of running the rewrite_scoped_ptr_ctor_null tool
across all files built on Linux in the components/ directory.

BUG=173286

Review URL: https://chromiumcodereview.appspot.com/16966002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206117 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dcheng@chromium.org committed Jun 13, 2013
1 parent 02c29b3 commit dcb4211
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion components/autofill/browser/autofill_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ void AutofillManager::ParseForms(const std::vector<FormData>& forms) {
// no form in the page. This give |autocheckout_manager| a chance to
// terminate Autocheckout and send Autocheckout status.
autocheckout_manager_.OnLoadedPageMetaData(
scoped_ptr<autofill::AutocheckoutPageMetaData>(NULL));
scoped_ptr<autofill::AutocheckoutPageMetaData>());
} else if (download_manager_) {
// Query the server if we have at least one of the forms were parsed.
download_manager_->StartQueryRequest(form_structures_.get(),
Expand Down
10 changes: 3 additions & 7 deletions components/autofill/browser/phone_number_i18n.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ bool PhoneNumbersMatch(const base::string16& number_a,

PhoneObject::PhoneObject(const base::string16& number,
const std::string& region)
: region_(region),
i18n_number_(NULL) {
: region_(region) {
DCHECK_EQ(2u, region.size());
// TODO(isherman): Autofill profiles should always have a |region| set, but in
// some cases it should be marked as implicit. Otherwise, phone numbers
Expand All @@ -250,12 +249,9 @@ PhoneObject::PhoneObject(const base::string16& number,
}
}

PhoneObject::PhoneObject(const PhoneObject& other) : i18n_number_(NULL) {
*this = other;
}
PhoneObject::PhoneObject(const PhoneObject& other) { *this = other; }

PhoneObject::PhoneObject() : i18n_number_(NULL) {
}
PhoneObject::PhoneObject() {}

PhoneObject::~PhoneObject() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ class MockResourceController : public content::ResourceController {

class TestIOThreadState {
public:
TestIOThreadState(const GURL& url, int render_process_id, int render_view_id,
TestIOThreadState(const GURL& url,
int render_process_id,
int render_view_id,
const std::string& request_method,
MockInterceptCallbackReceiver* callback_receiver)
: request_(url, NULL, resource_context_.GetRequestContext()),
throttle_(NULL) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
: request_(url, NULL, resource_context_.GetRequestContext()) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
if (render_process_id != MSG_ROUTING_NONE &&
render_view_id != MSG_ROUTING_NONE) {
content::ResourceRequestInfo::AllocateForTesting(
Expand Down
5 changes: 1 addition & 4 deletions components/webdata/common/web_data_request_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

WebDataRequest::WebDataRequest(WebDataServiceConsumer* consumer,
WebDataRequestManager* manager)
: manager_(manager),
cancelled_(false),
consumer_(consumer),
result_(NULL) {
: manager_(manager), cancelled_(false), consumer_(consumer) {
handle_ = manager_->GetNextRequestHandle();
message_loop_ = base::MessageLoop::current();
manager_->RegisterRequest(this);
Expand Down
2 changes: 1 addition & 1 deletion components/webdata/common/web_data_service_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ scoped_ptr<WDTypedResult> WebDataServiceBackend::ExecuteReadTask(
if (db_ && init_status_ == sql::INIT_OK) {
return task.Run(db_.get());
}
return scoped_ptr<WDTypedResult>(NULL);
return scoped_ptr<WDTypedResult>();
}

WebDataServiceBackend::~WebDataServiceBackend() {
Expand Down

0 comments on commit dcb4211

Please sign in to comment.