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

Side by Side Diff: chrome/browser/ui/search/instant_loader.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_loader.h" 5 #include "chrome/browser/ui/search/instant_loader.h"
6 6
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/history/history_tab_helper.h" 10 #include "chrome/browser/history/history_tab_helper.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // This HTTP header and value are set on loads that originate from Instant. 27 // This HTTP header and value are set on loads that originate from Instant.
28 const char kInstantHeader[] = "X-Purpose: Instant"; 28 const char kInstantHeader[] = "X-Purpose: Instant";
29 29
30 } // namespace 30 } // namespace
31 31
32 InstantLoader::Delegate::~Delegate() { 32 InstantLoader::Delegate::~Delegate() {
33 } 33 }
34 34
35 InstantLoader::InstantLoader(Delegate* delegate) 35 InstantLoader::InstantLoader(Delegate* delegate)
36 : delegate_(delegate), 36 : delegate_(delegate), stale_page_timer_(false, false) {}
37 contents_(NULL),
38 stale_page_timer_(false, false) {
39 }
40 37
41 InstantLoader::~InstantLoader() { 38 InstantLoader::~InstantLoader() {
42 } 39 }
43 40
44 void InstantLoader::Init(const GURL& instant_url, 41 void InstantLoader::Init(const GURL& instant_url,
45 Profile* profile, 42 Profile* profile,
46 const content::WebContents* active_tab, 43 const content::WebContents* active_tab,
47 const base::Closure& on_stale_callback) { 44 const base::Closure& on_stale_callback) {
48 content::WebContents::CreateParams create_params(profile); 45 content::WebContents::CreateParams create_params(profile);
49 create_params.site_instance = content::SiteInstance::CreateForURL( 46 create_params.site_instance = content::SiteInstance::CreateForURL(
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 230
234 bool InstantLoader::OnGoToEntryOffset(int /* offset */) { 231 bool InstantLoader::OnGoToEntryOffset(int /* offset */) {
235 return false; 232 return false;
236 } 233 }
237 234
238 content::WebContents* InstantLoader::OpenURLFromTab( 235 content::WebContents* InstantLoader::OpenURLFromTab(
239 content::WebContents* source, 236 content::WebContents* source,
240 const content::OpenURLParams& params) { 237 const content::OpenURLParams& params) {
241 return delegate_->OpenURLFromTab(source, params); 238 return delegate_->OpenURLFromTab(source, params);
242 } 239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698