Chromium Code Reviews| Index: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc |
| diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc |
| index fe11eeffc96f3d15eb54e7d0709a26a06c8416c2..f85b3f4cb6f462e061178cd58cc06f7b2a3105e1 100644 |
| --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc |
| +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc |
| @@ -99,9 +99,13 @@ void DispatchOnCommitted(const std::string& event_name, |
| dict->SetInteger(keys::kProcessIdKey, |
| web_contents->GetRenderViewHost()->GetProcess()->GetID()); |
| dict->SetInteger(keys::kFrameIdKey, GetFrameId(is_main_frame, frame_id)); |
| - dict->SetString( |
| - keys::kTransitionTypeKey, |
| - content::PageTransitionGetCoreTransitionString(transition_type)); |
| + std::string transition_type_string = |
| + content::PageTransitionGetCoreTransitionString(transition_type); |
| + // For webNavigation API backward compatibility, keep "start_page" even after |
| + // renamed to "auto_toplevel". |
| + if (transition_type_string == "auto_toplevel") |
|
jochen (gone - plz use gerrit)
2014/01/22 11:30:02
nit transition_type == PAGE_TRANSITION_TYPE_AUTO_T
Haojian Wu
2014/01/22 12:05:13
Done.
|
| + transition_type_string = "start_page"; |
| + dict->SetString(keys::kTransitionTypeKey, transition_type_string); |
| base::ListValue* qualifiers = new base::ListValue(); |
| if (transition_type & content::PAGE_TRANSITION_CLIENT_REDIRECT) |
| qualifiers->Append(new base::StringValue("client_redirect")); |