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

Side by Side Diff: extensions/browser/extension_prefs.cc

Issue 1055453007: Added CHECKs for null pointers in ChromeAppSorting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added CHECK(this) just to make sure that ExtensionPrefs is non-null. Created 5 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 | « extensions/browser/app_sorting.h ('k') | extensions/browser/null_app_sorting.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_prefs.h" 5 #include "extensions/browser/extension_prefs.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 scoped_ptr<AppSorting> app_sorting, 1859 scoped_ptr<AppSorting> app_sorting,
1860 scoped_ptr<TimeProvider> time_provider, 1860 scoped_ptr<TimeProvider> time_provider,
1861 bool extensions_disabled, 1861 bool extensions_disabled,
1862 const std::vector<ExtensionPrefsObserver*>& early_observers) 1862 const std::vector<ExtensionPrefsObserver*>& early_observers)
1863 : prefs_(prefs), 1863 : prefs_(prefs),
1864 install_directory_(root_dir), 1864 install_directory_(root_dir),
1865 extension_pref_value_map_(extension_pref_value_map), 1865 extension_pref_value_map_(extension_pref_value_map),
1866 app_sorting_(app_sorting.Pass()), 1866 app_sorting_(app_sorting.Pass()),
1867 time_provider_(time_provider.Pass()), 1867 time_provider_(time_provider.Pass()),
1868 extensions_disabled_(extensions_disabled) { 1868 extensions_disabled_(extensions_disabled) {
1869 // TODO(mgiuca): Added these checks to try and diagnose
1870 // http://crbug.com/476648. Remove them after the investigation is concluded.
1871 CHECK(this);
1869 app_sorting_->SetExtensionScopedPrefs(this); 1872 app_sorting_->SetExtensionScopedPrefs(this);
1873 app_sorting_->CheckExtensionScopedPrefs();
1870 MakePathsRelative(); 1874 MakePathsRelative();
1871 1875
1872 // Ensure that any early observers are watching before prefs are initialized. 1876 // Ensure that any early observers are watching before prefs are initialized.
1873 for (std::vector<ExtensionPrefsObserver*>::const_iterator iter = 1877 for (std::vector<ExtensionPrefsObserver*>::const_iterator iter =
1874 early_observers.begin(); 1878 early_observers.begin();
1875 iter != early_observers.end(); 1879 iter != early_observers.end();
1876 ++iter) { 1880 ++iter) {
1877 AddObserver(*iter); 1881 AddObserver(*iter);
1878 } 1882 }
1879 1883
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 extension_pref_value_map_->RegisterExtension( 2145 extension_pref_value_map_->RegisterExtension(
2142 extension_id, install_time, is_enabled, is_incognito_enabled); 2146 extension_id, install_time, is_enabled, is_incognito_enabled);
2143 2147
2144 FOR_EACH_OBSERVER( 2148 FOR_EACH_OBSERVER(
2145 ExtensionPrefsObserver, 2149 ExtensionPrefsObserver,
2146 observer_list_, 2150 observer_list_,
2147 OnExtensionRegistered(extension_id, install_time, is_enabled)); 2151 OnExtensionRegistered(extension_id, install_time, is_enabled));
2148 } 2152 }
2149 2153
2150 } // namespace extensions 2154 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_sorting.h ('k') | extensions/browser/null_app_sorting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698