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

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

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac win compile fixes Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/search_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include "chrome/browser/google/google_util.h" 7 #include "chrome/browser/google/google_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h" 9 #include "chrome/browser/ui/omnibox/omnibox_edit_model.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 SearchTabHelper::~SearchTabHelper() { 48 SearchTabHelper::~SearchTabHelper() {
49 } 49 }
50 50
51 content::WebContents* SearchTabHelper::GetNTPWebContents() { 51 content::WebContents* SearchTabHelper::GetNTPWebContents() {
52 if (!ntp_web_contents_.get()) { 52 if (!ntp_web_contents_.get()) {
53 ntp_web_contents_.reset(content::WebContents::Create( 53 ntp_web_contents_.reset(content::WebContents::Create(
54 model_.tab_contents()->profile(), 54 model_.tab_contents()->profile(),
55 model_.tab_contents()->web_contents()->GetSiteInstance(), 55 model_.tab_contents()->web_contents()->GetSiteInstance(),
56 MSG_ROUTING_NONE, 56 MSG_ROUTING_NONE,
57 NULL,
58 NULL)); 57 NULL));
59 ntp_web_contents_->GetController().LoadURL( 58 ntp_web_contents_->GetController().LoadURL(
60 GURL(chrome::kChromeUINewTabURL), 59 GURL(chrome::kChromeUINewTabURL),
61 content::Referrer(), 60 content::Referrer(),
62 content::PAGE_TRANSITION_START_PAGE, 61 content::PAGE_TRANSITION_START_PAGE,
63 std::string()); 62 std::string());
64 } 63 }
65 return ntp_web_contents_.get(); 64 return ntp_web_contents_.get();
66 } 65 }
67 66
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 116
118 void SearchTabHelper::FlushNTP(const GURL& url) { 117 void SearchTabHelper::FlushNTP(const GURL& url) {
119 if (!IsNTP(url) && 118 if (!IsNTP(url) &&
120 !google_util::IsInstantExtendedAPIGoogleSearchUrl(url.spec())) { 119 !google_util::IsInstantExtendedAPIGoogleSearchUrl(url.spec())) {
121 ntp_web_contents_.reset(); 120 ntp_web_contents_.reset();
122 } 121 }
123 } 122 }
124 123
125 } // namespace search 124 } // namespace search
126 } // namespace chrome 125 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698