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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 num_reloads_(0) {} | 79 num_reloads_(0) {} |
80 | 80 |
81 void DidStartNavigationToPendingEntry( | 81 void DidStartNavigationToPendingEntry( |
82 const GURL& url, | 82 const GURL& url, |
83 content::NavigationController::ReloadType reload_type) override { | 83 content::NavigationController::ReloadType reload_type) override { |
84 if (url_ == url) | 84 if (url_ == url) |
85 num_reloads_++; | 85 num_reloads_++; |
86 current_url_ = url; | 86 current_url_ = url; |
87 } | 87 } |
88 | 88 |
89 const GURL url() const { | 89 const GURL& url() const { return url_; } |
90 return url_; | |
91 } | |
92 | 90 |
93 const GURL current_url() const { | 91 const GURL& current_url() const { return contents_->GetURL(); } |
94 return contents_->GetURL(); | |
95 } | |
96 | 92 |
97 int num_reloads() const { | 93 int num_reloads() const { |
98 return num_reloads_; | 94 return num_reloads_; |
99 } | 95 } |
100 | 96 |
101 bool can_go_back() const { | 97 bool can_go_back() const { |
102 return contents_->GetController().CanGoBack(); | 98 return contents_->GetController().CanGoBack(); |
103 } | 99 } |
104 | 100 |
105 protected: | 101 protected: |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 216 |
221 browser.reset(NULL); | 217 browser.reset(NULL); |
222 window.reset(NULL); | 218 window.reset(NULL); |
223 EXPECT_FALSE(IsInstantServiceObserver(bic)) | 219 EXPECT_FALSE(IsInstantServiceObserver(bic)) |
224 << "New BrowserInstantController should register as InstantServiceObserver"; | 220 << "New BrowserInstantController should register as InstantServiceObserver"; |
225 } | 221 } |
226 | 222 |
227 } // namespace | 223 } // namespace |
228 | 224 |
229 } // namespace chrome | 225 } // namespace chrome |
OLD | NEW |