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

Side by Side Diff: chrome/browser/ui/search/instant_controller.cc

Issue 16703018: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/search/instant_controller.h" 5 #include "chrome/browser/ui/search/instant_controller.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 bool InstantController::WillFetchCompletions() const { 533 bool InstantController::WillFetchCompletions() const {
534 if (!extended_enabled()) 534 if (!extended_enabled())
535 return false; 535 return false;
536 536
537 return !UsingLocalPage(); 537 return !UsingLocalPage();
538 } 538 }
539 539
540 scoped_ptr<content::WebContents> InstantController::ReleaseNTPContents() { 540 scoped_ptr<content::WebContents> InstantController::ReleaseNTPContents() {
541 if (!extended_enabled() || !browser_->profile() || 541 if (!extended_enabled() || !browser_->profile() ||
542 browser_->profile()->IsOffTheRecord()) 542 browser_->profile()->IsOffTheRecord())
543 return scoped_ptr<content::WebContents>(NULL); 543 return scoped_ptr<content::WebContents>();
544 544
545 LOG_INSTANT_DEBUG_EVENT(this, "ReleaseNTPContents"); 545 LOG_INSTANT_DEBUG_EVENT(this, "ReleaseNTPContents");
546 546
547 if (ShouldSwitchToLocalNTP()) 547 if (ShouldSwitchToLocalNTP())
548 ResetNTP(GetLocalInstantURL()); 548 ResetNTP(GetLocalInstantURL());
549 549
550 scoped_ptr<content::WebContents> ntp_contents = ntp_->ReleaseContents(); 550 scoped_ptr<content::WebContents> ntp_contents = ntp_->ReleaseContents();
551 551
552 // Preload a new Instant NTP. 552 // Preload a new Instant NTP.
553 if (preload_ntp_) 553 if (preload_ntp_)
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1846 result->transition = match.transition; 1846 result->transition = match.transition;
1847 result->relevance = match.relevance; 1847 result->relevance = match.relevance;
1848 result->autocomplete_match_index = autocomplete_match_index; 1848 result->autocomplete_match_index = autocomplete_match_index;
1849 1849
1850 DVLOG(1) << " " << result->relevance << " " 1850 DVLOG(1) << " " << result->relevance << " "
1851 << UTF8ToUTF16(AutocompleteMatchType::ToString(result->type)) << " " 1851 << UTF8ToUTF16(AutocompleteMatchType::ToString(result->type)) << " "
1852 << result->provider << " " << result->destination_url << " '" 1852 << result->provider << " " << result->destination_url << " '"
1853 << result->description << "' '" << result->search_query << "' " 1853 << result->description << "' '" << result->search_query << "' "
1854 << result->transition << " " << result->autocomplete_match_index; 1854 << result->transition << " " << result->autocomplete_match_index;
1855 } 1855 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698