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

Side by Side Diff: chrome/browser/ui/sync/tab_contents_synced_tab_delegate.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
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/sync/tab_contents_synced_tab_delegate.h" 5 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "chrome/browser/extensions/tab_helper.h" 8 #include "chrome/browser/extensions/tab_helper.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/session_tab_helper.h" 10 #include "chrome/browser/sessions/session_tab_helper.h"
(...skipping 25 matching lines...) Expand all
36 return web_contents_->IsBeingDestroyed(); 36 return web_contents_->IsBeingDestroyed();
37 } 37 }
38 38
39 Profile* TabContentsSyncedTabDelegate::profile() const { 39 Profile* TabContentsSyncedTabDelegate::profile() const {
40 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 40 return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
41 } 41 }
42 42
43 std::string TabContentsSyncedTabDelegate::GetExtensionAppId() const { 43 std::string TabContentsSyncedTabDelegate::GetExtensionAppId() const {
44 const scoped_refptr<const extensions::Extension> extension_app( 44 const scoped_refptr<const extensions::Extension> extension_app(
45 extensions::TabHelper::FromWebContents(web_contents_)->extension_app()); 45 extensions::TabHelper::FromWebContents(web_contents_)->extension_app());
46 return (extension_app.get() ? extension_app->id() : ""); 46 return (extension_app.get() ? extension_app->id() : std::string());
47 } 47 }
48 48
49 int TabContentsSyncedTabDelegate::GetCurrentEntryIndex() const { 49 int TabContentsSyncedTabDelegate::GetCurrentEntryIndex() const {
50 return web_contents_->GetController().GetCurrentEntryIndex(); 50 return web_contents_->GetController().GetCurrentEntryIndex();
51 } 51 }
52 52
53 int TabContentsSyncedTabDelegate::GetEntryCount() const { 53 int TabContentsSyncedTabDelegate::GetEntryCount() const {
54 return web_contents_->GetController().GetEntryCount(); 54 return web_contents_->GetController().GetEntryCount();
55 } 55 }
56 56
(...skipping 13 matching lines...) Expand all
70 return web_contents_->GetController().GetActiveEntry(); 70 return web_contents_->GetController().GetActiveEntry();
71 } 71 }
72 72
73 bool TabContentsSyncedTabDelegate::IsPinned() const { 73 bool TabContentsSyncedTabDelegate::IsPinned() const {
74 const browser_sync::SyncedWindowDelegate* window = 74 const browser_sync::SyncedWindowDelegate* window =
75 browser_sync::SyncedWindowDelegate::FindSyncedWindowDelegateWithId( 75 browser_sync::SyncedWindowDelegate::FindSyncedWindowDelegateWithId(
76 GetWindowId()); 76 GetWindowId());
77 // We might not have a parent window, e.g. Developer Tools. 77 // We might not have a parent window, e.g. Developer Tools.
78 return window ? window->IsTabPinned(this) : false; 78 return window ? window->IsTabPinned(this) : false;
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper_unittest.cc ('k') | chrome/browser/ui/website_settings/website_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698