Cleanup PushMessagingAppIdentifier
commitdb9cb0e5848645420e439277974b5aa379d83553
authorjohnme <johnme@chromium.org>
Tue, 12 May 2015 14:55:42 +0000 (12 07:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 12 May 2015 14:56:02 +0000 (12 14:56 +0000)
tree87e8f7c3ea097d9f1154cd3a17fbf3a2cbf51861
parent8fdc58112812ebd3401e49638c6c0f9cbf3779b3
Cleanup PushMessagingAppIdentifier

In particular, the IsValid method had a confusing dual purpose - it was
used both to sanity check the inputs, and to check whether the instances
returned by the Get methods were null (i.e. Get failed). It has been
split into is_null() and DCheckValid(). Note that having DCheckValid as
a method also gives better stacktraces than the old DCHECK(IsValid())
style, since stacktraces will indicate which check failed.

BUG=458592

Review URL: https://codereview.chromium.org/1131303002

Cr-Commit-Position: refs/heads/master@{#329406}
chrome/browser/push_messaging/push_messaging_app_identifier.cc
chrome/browser/push_messaging/push_messaging_app_identifier.h
chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
chrome/browser/push_messaging/push_messaging_browsertest.cc
chrome/browser/push_messaging/push_messaging_service_impl.cc