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

Side by Side Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 1845813002: Suspected fix for a tab image caching bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simpler comment Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_controller.h » ('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/views/tabs/browser_tab_strip_controller.h" 5 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/task_runner_util.h" 9 #include "base/task_runner_util.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // Use autocomplete to clean up the text, going so far as to turn it into 367 // Use autocomplete to clean up the text, going so far as to turn it into
368 // a search query if necessary. 368 // a search query if necessary.
369 AutocompleteMatch match; 369 AutocompleteMatch match;
370 AutocompleteClassifierFactory::GetForProfile(profile())->Classify( 370 AutocompleteClassifierFactory::GetForProfile(profile())->Classify(
371 location, false, false, metrics::OmniboxEventProto::BLANK, &match, NULL); 371 location, false, false, metrics::OmniboxEventProto::BLANK, &match, NULL);
372 if (match.destination_url.is_valid()) 372 if (match.destination_url.is_valid())
373 model_->delegate()->AddTabAt(match.destination_url, -1, true); 373 model_->delegate()->AddTabAt(match.destination_url, -1, true);
374 } 374 }
375 375
376 bool BrowserTabStripController::IsIncognito() { 376 bool BrowserTabStripController::IsIncognito() {
377 return browser_->profile()->IsOffTheRecord(); 377 return browser_->profile()->GetProfileType() == Profile::INCOGNITO_PROFILE;
378 } 378 }
379 379
380 void BrowserTabStripController::StackedLayoutMaybeChanged() { 380 void BrowserTabStripController::StackedLayoutMaybeChanged() {
381 bool adjust_layout = false; 381 bool adjust_layout = false;
382 bool stacked_layout = DetermineTabStripLayoutStacked( 382 bool stacked_layout = DetermineTabStripLayoutStacked(
383 g_browser_process->local_state(), &adjust_layout); 383 g_browser_process->local_state(), &adjust_layout);
384 if (!adjust_layout || stacked_layout == tabstrip_->stacked_layout()) 384 if (!adjust_layout || stacked_layout == tabstrip_->stacked_layout())
385 return; 385 return;
386 386
387 g_browser_process->local_state()->SetBoolean(prefs::kTabStripStackedLayout, 387 g_browser_process->local_state()->SetBoolean(prefs::kTabStripStackedLayout,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 content::WebPluginInfo plugin; 571 content::WebPluginInfo plugin;
572 tabstrip_->FileSupported( 572 tabstrip_->FileSupported(
573 url, 573 url,
574 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) || 574 mime_type.empty() || mime_util::IsSupportedMimeType(mime_type) ||
575 content::PluginService::GetInstance()->GetPluginInfo( 575 content::PluginService::GetInstance()->GetPluginInfo(
576 -1, // process ID 576 -1, // process ID
577 MSG_ROUTING_NONE, // routing ID 577 MSG_ROUTING_NONE, // routing ID
578 model_->profile()->GetResourceContext(), url, GURL(), mime_type, 578 model_->profile()->GetResourceContext(), url, GURL(), mime_type,
579 false, NULL, &plugin, NULL)); 579 false, NULL, &plugin, NULL));
580 } 580 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698