Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: chrome/browser/dom_ui/dom_ui_contents.cc

Issue 43054: Stop history search going on beyond the start of history.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/dom_ui/dom_ui_contents.h" 5 #include "chrome/browser/dom_ui/dom_ui_contents.h"
6 6
7 #include "chrome/browser/debugger/debugger_contents.h" 7 #include "chrome/browser/debugger/debugger_contents.h"
8 #include "chrome/browser/dom_ui/dev_tools_ui.h" 8 #include "chrome/browser/dom_ui/dev_tools_ui.h"
9 #include "chrome/browser/dom_ui/dom_ui.h" 9 #include "chrome/browser/dom_ui/dom_ui.h"
10 #include "chrome/browser/dom_ui/downloads_ui.h" 10 #include "chrome/browser/dom_ui/downloads_ui.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 bool DOMUIContents::InitCurrentUI(bool reload) { 240 bool DOMUIContents::InitCurrentUI(bool reload) {
241 if (!controller()->GetActiveEntry()) 241 if (!controller()->GetActiveEntry())
242 return false; 242 return false;
243 243
244 GURL url = controller()->GetActiveEntry()->url(); 244 GURL url = controller()->GetActiveEntry()->url();
245 245
246 if (url.is_empty() || !url.is_valid()) 246 if (url.is_empty() || !url.is_valid())
247 return false; 247 return false;
248 248
249 if (reload || url != current_url_) { 249 if (reload || url.host() != current_url_.host()) {
250 // Shut down our existing DOMUI. 250 // Shut down our existing DOMUI.
251 delete current_ui_; 251 delete current_ui_;
252 current_ui_ = NULL; 252 current_ui_ = NULL;
253 253
254 // Set up a new DOMUI. 254 // Set up a new DOMUI.
255 current_ui_ = GetDOMUIForURL(url); 255 current_ui_ = GetDOMUIForURL(url);
256 if (current_ui_) { 256 if (current_ui_) {
257 current_ui_->Init(); 257 current_ui_->Init();
258 current_url_ = url; 258 current_url_ = url;
259 return true; 259 return true;
(...skipping 30 matching lines...) Expand all
290 return new DebuggerContents(this); 290 return new DebuggerContents(this);
291 } 291 }
292 if (url.host() == DevToolsUI::GetBaseURL().host()) { 292 if (url.host() == DevToolsUI::GetBaseURL().host()) {
293 return new DevToolsUI(this); 293 return new DevToolsUI(this);
294 } 294 }
295 #else 295 #else
296 NOTIMPLEMENTED(); 296 NOTIMPLEMENTED();
297 #endif 297 #endif
298 return NULL; 298 return NULL;
299 } 299 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/history_ui.h » ('j') | chrome/browser/history/history_backend.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698