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

Side by Side Diff: chrome/browser/ui/browser_tabrestore.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/browser_tab_contents.cc ('k') | chrome/browser/ui/certificate_dialogs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_tabrestore.h" 5 #include "chrome/browser/ui/browser_tabrestore.h"
6 6
7 #include "chrome/browser/extensions/tab_helper.h" 7 #include "chrome/browser/extensions/tab_helper.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sessions/session_service.h" 9 #include "chrome/browser/sessions/session_service.h"
10 #include "chrome/browser/sessions/session_service_factory.h" 10 #include "chrome/browser/sessions/session_service_factory.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 bool from_last_session, 43 bool from_last_session,
44 content::SessionStorageNamespace* session_storage_namespace, 44 content::SessionStorageNamespace* session_storage_namespace,
45 const std::string& user_agent_override) { 45 const std::string& user_agent_override) {
46 GURL restore_url = navigations.at(selected_navigation).virtual_url(); 46 GURL restore_url = navigations.at(selected_navigation).virtual_url();
47 // TODO(ajwong): Remove the temporary session_storage_namespace_map when 47 // TODO(ajwong): Remove the temporary session_storage_namespace_map when
48 // we teach session restore to understand that one tab can have multiple 48 // we teach session restore to understand that one tab can have multiple
49 // SessionStorageNamespace objects. Also remove the 49 // SessionStorageNamespace objects. Also remove the
50 // session_storage_namespace.h include since we only need that to assign 50 // session_storage_namespace.h include since we only need that to assign
51 // into the map. 51 // into the map.
52 content::SessionStorageNamespaceMap session_storage_namespace_map; 52 content::SessionStorageNamespaceMap session_storage_namespace_map;
53 session_storage_namespace_map[""] = session_storage_namespace; 53 session_storage_namespace_map[std::string()] = session_storage_namespace;
54 WebContents::CreateParams create_params( 54 WebContents::CreateParams create_params(
55 browser->profile(), 55 browser->profile(),
56 tab_util::GetSiteInstanceForNewTab(browser->profile(), restore_url)); 56 tab_util::GetSiteInstanceForNewTab(browser->profile(), restore_url));
57 WebContents* base_web_contents = 57 WebContents* base_web_contents =
58 browser->tab_strip_model()->GetActiveWebContents(); 58 browser->tab_strip_model()->GetActiveWebContents();
59 if (base_web_contents) { 59 if (base_web_contents) {
60 create_params.initial_size = 60 create_params.initial_size =
61 base_web_contents->GetView()->GetContainerSize(); 61 base_web_contents->GetView()->GetContainerSize();
62 } 62 }
63 WebContents* web_contents = content::WebContents::CreateWithSessionStorage( 63 WebContents* web_contents = content::WebContents::CreateWithSessionStorage(
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 TabStripModel* tab_strip = browser->tab_strip_model(); 150 TabStripModel* tab_strip = browser->tab_strip_model();
151 int insertion_index = tab_strip->active_index(); 151 int insertion_index = tab_strip->active_index();
152 tab_strip->InsertWebContentsAt(insertion_index + 1, 152 tab_strip->InsertWebContentsAt(insertion_index + 1,
153 web_contents, 153 web_contents,
154 TabStripModel::ADD_ACTIVE | 154 TabStripModel::ADD_ACTIVE |
155 TabStripModel::ADD_INHERIT_GROUP); 155 TabStripModel::ADD_INHERIT_GROUP);
156 tab_strip->CloseWebContentsAt(insertion_index, TabStripModel::CLOSE_NONE); 156 tab_strip->CloseWebContentsAt(insertion_index, TabStripModel::CLOSE_NONE);
157 } 157 }
158 158
159 } // namespace chrome 159 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_contents.cc ('k') | chrome/browser/ui/certificate_dialogs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698