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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 156843004: Remove ExtensionService::extension_prefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix UserScriptListenerTests.MultiProfile Created 6 years, 10 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/extensions/api/downloads/downloads_api.h" 5 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cctype> 8 #include <cctype>
9 #include <iterator> 9 #include <iterator>
10 #include <set> 10 #include <set>
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 std::map<DownloadManager*, ManagerDestructionObserver*>* 893 std::map<DownloadManager*, ManagerDestructionObserver*>*
894 ManagerDestructionObserver::manager_file_existence_last_checked_ = NULL; 894 ManagerDestructionObserver::manager_file_existence_last_checked_ = NULL;
895 895
896 void OnDeterminingFilenameWillDispatchCallback( 896 void OnDeterminingFilenameWillDispatchCallback(
897 bool* any_determiners, 897 bool* any_determiners,
898 ExtensionDownloadsEventRouterData* data, 898 ExtensionDownloadsEventRouterData* data,
899 content::BrowserContext* context, 899 content::BrowserContext* context,
900 const extensions::Extension* extension, 900 const extensions::Extension* extension,
901 base::ListValue* event_args) { 901 base::ListValue* event_args) {
902 *any_determiners = true; 902 *any_determiners = true;
903 base::Time installed = extensions::ExtensionSystem::Get( 903 base::Time installed =
904 context)->extension_service()->extension_prefs()-> 904 extensions::ExtensionPrefs::Get(context)->GetInstallTime(extension->id());
905 GetInstallTime(extension->id());
906 data->AddPendingDeterminer(extension->id(), installed); 905 data->AddPendingDeterminer(extension->id(), installed);
907 } 906 }
908 907
909 bool Fault(bool error, 908 bool Fault(bool error,
910 const char* message_in, 909 const char* message_in,
911 std::string* message_out) { 910 std::string* message_out) {
912 if (!error) 911 if (!error)
913 return false; 912 return false;
914 *message_out = message_in; 913 *message_out = message_in;
915 return true; 914 return true;
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 extensions::UnloadedExtensionInfo* unloaded = 1898 extensions::UnloadedExtensionInfo* unloaded =
1900 content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); 1899 content::Details<extensions::UnloadedExtensionInfo>(details).ptr();
1901 std::set<const extensions::Extension*>::iterator iter = 1900 std::set<const extensions::Extension*>::iterator iter =
1902 shelf_disabling_extensions_.find(unloaded->extension); 1901 shelf_disabling_extensions_.find(unloaded->extension);
1903 if (iter != shelf_disabling_extensions_.end()) 1902 if (iter != shelf_disabling_extensions_.end())
1904 shelf_disabling_extensions_.erase(iter); 1903 shelf_disabling_extensions_.erase(iter);
1905 break; 1904 break;
1906 } 1905 }
1907 } 1906 }
1908 } 1907 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698