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

Side by Side Diff: chrome/browser/extensions/api/content_settings/content_settings_store.cc

Issue 22031003: Rename BrowserThread::IsWellKnownThread to IsThreadInitialized. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Minor comment reword. Created 7 years, 4 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 | « chrome/browser/apps/shortcut_manager.cc ('k') | chrome/browser/google/google_util_chromeos.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/extensions/api/content_settings/content_settings_store. h" 5 #include "chrome/browser/extensions/api/content_settings/content_settings_store. h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 const std::string& extension_id, 342 const std::string& extension_id,
343 bool incognito) { 343 bool incognito) {
344 FOR_EACH_OBSERVER( 344 FOR_EACH_OBSERVER(
345 ContentSettingsStore::Observer, 345 ContentSettingsStore::Observer,
346 observers_, 346 observers_,
347 OnContentSettingChanged(extension_id, incognito)); 347 OnContentSettingChanged(extension_id, incognito));
348 } 348 }
349 349
350 bool ContentSettingsStore::OnCorrectThread() { 350 bool ContentSettingsStore::OnCorrectThread() {
351 // If there is no UI thread, we're most likely in a unit test. 351 // If there is no UI thread, we're most likely in a unit test.
352 return !BrowserThread::IsWellKnownThread(BrowserThread::UI) || 352 return !BrowserThread::IsThreadInitialized(BrowserThread::UI) ||
353 BrowserThread::CurrentlyOn(BrowserThread::UI); 353 BrowserThread::CurrentlyOn(BrowserThread::UI);
354 } 354 }
355 355
356 ContentSettingsStore::ExtensionEntryMap::iterator 356 ContentSettingsStore::ExtensionEntryMap::iterator
357 ContentSettingsStore::FindEntry(const std::string& ext_id) { 357 ContentSettingsStore::FindEntry(const std::string& ext_id) {
358 ExtensionEntryMap::iterator i; 358 ExtensionEntryMap::iterator i;
359 for (i = entries_.begin(); i != entries_.end(); ++i) { 359 for (i = entries_.begin(); i != entries_.end(); ++i) {
360 if (i->second->id == ext_id) 360 if (i->second->id == ext_id)
361 return i; 361 return i;
362 } 362 }
363 return entries_.end(); 363 return entries_.end();
364 } 364 }
365 365
366 ContentSettingsStore::ExtensionEntryMap::const_iterator 366 ContentSettingsStore::ExtensionEntryMap::const_iterator
367 ContentSettingsStore::FindEntry(const std::string& ext_id) const { 367 ContentSettingsStore::FindEntry(const std::string& ext_id) const {
368 ExtensionEntryMap::const_iterator i; 368 ExtensionEntryMap::const_iterator i;
369 for (i = entries_.begin(); i != entries_.end(); ++i) { 369 for (i = entries_.begin(); i != entries_.end(); ++i) {
370 if (i->second->id == ext_id) 370 if (i->second->id == ext_id)
371 return i; 371 return i;
372 } 372 }
373 return entries_.end(); 373 return entries_.end();
374 } 374 }
375 375
376 } // namespace extensions 376 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/apps/shortcut_manager.cc ('k') | chrome/browser/google/google_util_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698