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

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

Issue 10555005: Address bug where the one-click sign-in bar would never show again once (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Unused import, whitespace Created 8 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 (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/tab_contents/tab_contents.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "chrome/browser/autocomplete_history_manager.h" 9 #include "chrome/browser/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_external_delegate.h" 10 #include "chrome/browser/autofill/autofill_external_delegate.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 thumbnail_generator_.reset(new ThumbnailGenerator); 163 thumbnail_generator_.reset(new ThumbnailGenerator);
164 thumbnail_generator_->StartThumbnailing(web_contents_.get()); 164 thumbnail_generator_->StartThumbnailing(web_contents_.get());
165 } 165 }
166 166
167 // If this is not an incognito window, setup to handle one-click login. 167 // If this is not an incognito window, setup to handle one-click login.
168 // We don't want to check that the profile is already connected at this time 168 // We don't want to check that the profile is already connected at this time
169 // because the connected state may change while this tab is open. Having a 169 // because the connected state may change while this tab is open. Having a
170 // one-click signin helper attached does not cause problems if the profile 170 // one-click signin helper attached does not cause problems if the profile
171 // happens to be already connected. 171 // happens to be already connected.
172 #if defined(ENABLE_ONE_CLICK_SIGNIN) 172 #if defined(ENABLE_ONE_CLICK_SIGNIN)
173 if (OneClickSigninHelper::CanOffer(contents, false)) 173 if (OneClickSigninHelper::CanOffer(contents, "", false))
174 one_click_signin_helper_.reset(new OneClickSigninHelper(contents)); 174 one_click_signin_helper_.reset(new OneClickSigninHelper(contents));
175 #endif 175 #endif
176 } 176 }
177 177
178 TabContents::~TabContents() { 178 TabContents::~TabContents() {
179 in_destructor_ = true; 179 in_destructor_ = true;
180 180
181 // Need to reset |thumbnail_generator_| here before |web_contents_| is 181 // Need to reset |thumbnail_generator_| here before |web_contents_| is
182 // deleted because destructing |web_contents_| can end up causing the 182 // deleted because destructing |web_contents_| can end up causing the
183 // thumbnailer to generate a thumbnail. Since TabContents can be 183 // thumbnailer to generate a thumbnail. Since TabContents can be
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 //////////////////////////////////////////////////////////////////////////////// 240 ////////////////////////////////////////////////////////////////////////////////
241 // WebContentsObserver overrides 241 // WebContentsObserver overrides
242 242
243 void TabContents::WebContentsDestroyed(WebContents* tab) { 243 void TabContents::WebContentsDestroyed(WebContents* tab) {
244 // Destruction of the WebContents should only be done by us from our 244 // Destruction of the WebContents should only be done by us from our
245 // destructor. Otherwise it's very likely we (or one of the helpers we own) 245 // destructor. Otherwise it's very likely we (or one of the helpers we own)
246 // will attempt to access the WebContents and we'll crash. 246 // will attempt to access the WebContents and we'll crash.
247 DCHECK(in_destructor_); 247 DCHECK(in_destructor_);
248 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698