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" | |
44 #include "base/debug/dump_without_crashing.h" | 43 #include "base/debug/dump_without_crashing.h" |
45 #include "base/logging.h" | 44 #include "base/logging.h" |
46 #include "base/memory/ptr_util.h" | 45 #include "base/memory/ptr_util.h" |
47 #include "base/metrics/histogram_macros.h" | 46 #include "base/metrics/histogram_macros.h" |
48 #include "base/strings/string_number_conversions.h" // Temporary | 47 #include "base/strings/string_number_conversions.h" // Temporary |
49 #include "base/strings/string_util.h" | 48 #include "base/strings/string_util.h" |
50 #include "base/strings/utf_string_conversions.h" | 49 #include "base/strings/utf_string_conversions.h" |
51 #include "base/time/time.h" | 50 #include "base/time/time.h" |
52 #include "base/trace_event/trace_event.h" | 51 #include "base/trace_event/trace_event.h" |
53 #include "build/build_config.h" | 52 #include "build/build_config.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 std::string debug_info = | 180 std::string debug_info = |
182 navigation_description + ": " + | 181 navigation_description + ": " + |
183 std::string(is_in_page ? "Is in page, " : "Is not in page, ") + | 182 std::string(is_in_page ? "Is in page, " : "Is not in page, ") + |
184 std::string(params.nav_entry_id ? "has nav entry id, " | 183 std::string(params.nav_entry_id ? "has nav entry id, " |
185 : "does not have nav entry id, ") + | 184 : "does not have nav entry id, ") + |
186 std::string(params.did_create_new_entry ? "did create new entry, " | 185 std::string(params.did_create_new_entry ? "did create new entry, " |
187 : "did not create new entry, ") + | 186 : "did not create new entry, ") + |
188 std::string(params.should_replace_current_entry | 187 std::string(params.should_replace_current_entry |
189 ? "should replace current entry, " | 188 ? "should replace current entry, " |
190 : "should not replace current entry, ") + | 189 : "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, " : "") + | |
195 entry->GetURL().spec() + " -> " + params.url.spec(); | 190 entry->GetURL().spec() + " -> " + params.url.spec(); |
196 base::debug::ScopedCrashKey crash_key( | 191 char debug_buf[2000]; |
197 "navigation_controller_impl_renderer_did_navigate", debug_info); | 192 base::strlcpy(debug_buf, debug_info.c_str(), arraysize(debug_buf)); |
| 193 base::debug::Alias(&debug_buf); |
198 base::debug::DumpWithoutCrashing(); | 194 base::debug::DumpWithoutCrashing(); |
199 } | 195 } |
200 | 196 |
201 } // namespace | 197 } // namespace |
202 | 198 |
203 // NavigationControllerImpl ---------------------------------------------------- | 199 // NavigationControllerImpl ---------------------------------------------------- |
204 | 200 |
205 const size_t kMaxEntryCountForTestingNotSet = static_cast<size_t>(-1); | 201 const size_t kMaxEntryCountForTestingNotSet = static_cast<size_t>(-1); |
206 | 202 |
207 // static | 203 // static |
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 } | 2182 } |
2187 } | 2183 } |
2188 } | 2184 } |
2189 | 2185 |
2190 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2186 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2191 const base::Callback<base::Time()>& get_timestamp_callback) { | 2187 const base::Callback<base::Time()>& get_timestamp_callback) { |
2192 get_timestamp_callback_ = get_timestamp_callback; | 2188 get_timestamp_callback_ = get_timestamp_callback; |
2193 } | 2189 } |
2194 | 2190 |
2195 } // namespace content | 2191 } // namespace content |
OLD | NEW |