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

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 8198003: Convert app_launch_index and page_index from int to StringOrdinal. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changing strings to StringOrdinals Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 for (size_t i = 0; i < extensions_.size(); ++i) { 2002 for (size_t i = 0; i < extensions_.size(); ++i) {
2003 if (!extensions_[i]->is_theme() && 2003 if (!extensions_[i]->is_theme() &&
2004 extensions_[i]->location() != Extension::COMPONENT) 2004 extensions_[i]->location() != Extension::COMPONENT)
2005 extension_ids.insert(extensions_[i]->id()); 2005 extension_ids.insert(extensions_[i]->id());
2006 } 2006 }
2007 2007
2008 child_process_logging::SetActiveExtensions(extension_ids); 2008 child_process_logging::SetActiveExtensions(extension_ids);
2009 } 2009 }
2010 2010
2011 void ExtensionService::OnExtensionInstalled( 2011 void ExtensionService::OnExtensionInstalled(
2012 const Extension* extension, bool from_webstore, int page_index) { 2012 const Extension* extension, bool from_webstore, StringOrdinal page_index) {
2013 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 2013 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
2014 2014
2015 // Ensure extension is deleted unless we transfer ownership. 2015 // Ensure extension is deleted unless we transfer ownership.
2016 scoped_refptr<const Extension> scoped_extension(extension); 2016 scoped_refptr<const Extension> scoped_extension(extension);
2017 const std::string& id = extension->id(); 2017 const std::string& id = extension->id();
2018 // Extensions installed by policy can't be disabled. So even if a previous 2018 // Extensions installed by policy can't be disabled. So even if a previous
2019 // installation disabled the extension, make sure it is now enabled. 2019 // installation disabled the extension, make sure it is now enabled.
2020 bool initial_enable = 2020 bool initial_enable =
2021 !extension_prefs_->IsExtensionDisabled(id) || 2021 !extension_prefs_->IsExtensionDisabled(id) ||
2022 !Extension::UserMayDisable(extension->location()); 2022 !Extension::UserMayDisable(extension->location());
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 2491
2492 ExtensionService::NaClModuleInfoList::iterator 2492 ExtensionService::NaClModuleInfoList::iterator
2493 ExtensionService::FindNaClModule(const GURL& url) { 2493 ExtensionService::FindNaClModule(const GURL& url) {
2494 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); 2494 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin();
2495 iter != nacl_module_list_.end(); ++iter) { 2495 iter != nacl_module_list_.end(); ++iter) {
2496 if (iter->url == url) 2496 if (iter->url == url)
2497 return iter; 2497 return iter;
2498 } 2498 }
2499 return nacl_module_list_.end(); 2499 return nacl_module_list_.end();
2500 } 2500 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698