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

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/external_tab_container_win.h" 5 #include "chrome/browser/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 return container; 909 return container;
910 } 910 }
911 911
912 NOTREACHED() << "Failed to find ExternalTabContainer for cookie: " 912 NOTREACHED() << "Failed to find ExternalTabContainer for cookie: "
913 << cookie; 913 << cookie;
914 return NULL; 914 return NULL;
915 } 915 }
916 916
917 void ExternalTabContainer::SetEnableExtensionAutomation( 917 void ExternalTabContainer::SetEnableExtensionAutomation(
918 const std::vector<std::string>& functions_enabled) { 918 const std::vector<std::string>& functions_enabled) {
919 if (functions_enabled.size() > 0) { 919 if (!functions_enabled.empty()) {
920 if (!tab_contents_.get()) { 920 if (!tab_contents_.get()) {
921 NOTREACHED() << "Being invoked via tab so should have TabContents"; 921 NOTREACHED() << "Being invoked via tab so should have TabContents";
922 return; 922 return;
923 } 923 }
924 924
925 AutomationExtensionFunction::Enable(tab_contents_->tab_contents(), 925 AutomationExtensionFunction::Enable(tab_contents_->tab_contents(),
926 functions_enabled); 926 functions_enabled);
927 enabled_extension_automation_ = true; 927 enabled_extension_automation_ = true;
928 } else { 928 } else {
929 AutomationExtensionFunction::Disable(); 929 AutomationExtensionFunction::Disable();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 1122
1123 if (disposition == CURRENT_TAB) { 1123 if (disposition == CURRENT_TAB) {
1124 DCHECK(route_all_top_level_navigations_); 1124 DCHECK(route_all_top_level_navigations_);
1125 disposition = NEW_FOREGROUND_TAB; 1125 disposition = NEW_FOREGROUND_TAB;
1126 } 1126 }
1127 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, 1127 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition,
1128 transition); 1128 transition);
1129 // support only one navigation for a dummy tab before it is killed. 1129 // support only one navigation for a dummy tab before it is killed.
1130 ::DestroyWindow(GetNativeView()); 1130 ::DestroyWindow(GetNativeView());
1131 } 1131 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698