OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /* | 5 /* |
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 22 matching lines...) Expand all Loading... |
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 */ | 34 */ |
35 | 35 |
36 #include "content/browser/frame_host/navigation_controller_impl.h" | 36 #include "content/browser/frame_host/navigation_controller_impl.h" |
37 | 37 |
38 #include <utility> | 38 #include <utility> |
39 | 39 |
40 #include "base/bind.h" | 40 #include "base/bind.h" |
41 #include "base/command_line.h" | 41 #include "base/command_line.h" |
42 #include "base/debug/alias.h" | 42 #include "base/debug/alias.h" |
| 43 #include "base/debug/crash_logging.h" |
43 #include "base/debug/dump_without_crashing.h" | 44 #include "base/debug/dump_without_crashing.h" |
44 #include "base/logging.h" | 45 #include "base/logging.h" |
45 #include "base/memory/ptr_util.h" | 46 #include "base/memory/ptr_util.h" |
46 #include "base/metrics/histogram_macros.h" | 47 #include "base/metrics/histogram_macros.h" |
47 #include "base/strings/string_number_conversions.h" // Temporary | 48 #include "base/strings/string_number_conversions.h" // Temporary |
48 #include "base/strings/string_util.h" | 49 #include "base/strings/string_util.h" |
49 #include "base/strings/utf_string_conversions.h" | 50 #include "base/strings/utf_string_conversions.h" |
50 #include "base/time/time.h" | 51 #include "base/time/time.h" |
51 #include "base/trace_event/trace_event.h" | 52 #include "base/trace_event/trace_event.h" |
52 #include "build/build_config.h" | 53 #include "build/build_config.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 std::string debug_info = | 181 std::string debug_info = |
181 navigation_description + ": " + | 182 navigation_description + ": " + |
182 std::string(is_in_page ? "Is in page, " : "Is not in page, ") + | 183 std::string(is_in_page ? "Is in page, " : "Is not in page, ") + |
183 std::string(params.nav_entry_id ? "has nav entry id, " | 184 std::string(params.nav_entry_id ? "has nav entry id, " |
184 : "does not have nav entry id, ") + | 185 : "does not have nav entry id, ") + |
185 std::string(params.did_create_new_entry ? "did create new entry, " | 186 std::string(params.did_create_new_entry ? "did create new entry, " |
186 : "did not create new entry, ") + | 187 : "did not create new entry, ") + |
187 std::string(params.should_replace_current_entry | 188 std::string(params.should_replace_current_entry |
188 ? "should replace current entry, " | 189 ? "should replace current entry, " |
189 : "should not replace current entry, ") + | 190 : "should not replace current entry, ") + |
| 191 std::string(params.intended_as_new_entry |
| 192 ? "intended as new entry, " |
| 193 : "not intended as new entry, ") + |
| 194 std::string(params.url_is_unreachable ? "URL is unreachable, " : "") + |
190 entry->GetURL().spec() + " -> " + params.url.spec(); | 195 entry->GetURL().spec() + " -> " + params.url.spec(); |
191 char debug_buf[2000]; | 196 base::debug::ScopedCrashKey crash_key( |
192 base::strlcpy(debug_buf, debug_info.c_str(), arraysize(debug_buf)); | 197 "navigation_controller_impl_renderer_did_navigate", debug_info); |
193 base::debug::Alias(&debug_buf); | |
194 base::debug::DumpWithoutCrashing(); | 198 base::debug::DumpWithoutCrashing(); |
195 } | 199 } |
196 | 200 |
197 } // namespace | 201 } // namespace |
198 | 202 |
199 // NavigationControllerImpl ---------------------------------------------------- | 203 // NavigationControllerImpl ---------------------------------------------------- |
200 | 204 |
201 const size_t kMaxEntryCountForTestingNotSet = static_cast<size_t>(-1); | 205 const size_t kMaxEntryCountForTestingNotSet = static_cast<size_t>(-1); |
202 | 206 |
203 // static | 207 // static |
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 } | 2186 } |
2183 } | 2187 } |
2184 } | 2188 } |
2185 | 2189 |
2186 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2190 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2187 const base::Callback<base::Time()>& get_timestamp_callback) { | 2191 const base::Callback<base::Time()>& get_timestamp_callback) { |
2188 get_timestamp_callback_ = get_timestamp_callback; | 2192 get_timestamp_callback_ = get_timestamp_callback; |
2189 } | 2193 } |
2190 | 2194 |
2191 } // namespace content | 2195 } // namespace content |
OLD | NEW |