| Index: chrome/common/page_transition_types.cc
|
| diff --git a/chrome/common/page_transition_types.cc b/chrome/common/page_transition_types.cc
|
| index 9fb49cd2d08812892c823c82ebcec37b35041efc..bf686f9abb150b24e504e4c7425823197272aab5 100644
|
| --- a/chrome/common/page_transition_types.cc
|
| +++ b/chrome/common/page_transition_types.cc
|
| @@ -4,6 +4,20 @@
|
|
|
| #include "chrome/common/page_transition_types.h"
|
|
|
| +#include "base/logging.h"
|
| +
|
| +// static
|
| +PageTransition::Type PageTransition::FromInt(int32 type) {
|
| + if (!ValidType(type)) {
|
| + NOTREACHED() << "Invalid transition type " << type;
|
| +
|
| + // Return a safe default so we don't have corrupt data in release mode.
|
| + return LINK;
|
| + }
|
| + return static_cast<Type>(type);
|
| +}
|
| +
|
| +// static
|
| const char* PageTransition::CoreTransitionString(Type type) {
|
| switch (type & PageTransition::CORE_MASK) {
|
| case 0: return "link";
|
|
|