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

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

Issue 10920017: [Sync] Generalize StringOrdinal to handle ordinal_in_parent field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Relax tests Created 8 years, 3 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/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 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 if (!extension->is_theme() && extension->location() != Extension::COMPONENT) 2120 if (!extension->is_theme() && extension->location() != Extension::COMPONENT)
2121 extension_ids.insert(extension->id()); 2121 extension_ids.insert(extension->id());
2122 } 2122 }
2123 2123
2124 child_process_logging::SetActiveExtensions(extension_ids); 2124 child_process_logging::SetActiveExtensions(extension_ids);
2125 } 2125 }
2126 2126
2127 void ExtensionService::OnExtensionInstalled( 2127 void ExtensionService::OnExtensionInstalled(
2128 const Extension* extension, 2128 const Extension* extension,
2129 bool from_webstore, 2129 bool from_webstore,
2130 const StringOrdinal& page_ordinal) { 2130 const syncer::StringOrdinal& page_ordinal) {
2131 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 2131 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
2132 2132
2133 // Ensure extension is deleted unless we transfer ownership. 2133 // Ensure extension is deleted unless we transfer ownership.
2134 scoped_refptr<const Extension> scoped_extension(extension); 2134 scoped_refptr<const Extension> scoped_extension(extension);
2135 const std::string& id = extension->id(); 2135 const std::string& id = extension->id();
2136 // Extensions installed by policy can't be disabled. So even if a previous 2136 // Extensions installed by policy can't be disabled. So even if a previous
2137 // installation disabled the extension, make sure it is now enabled. 2137 // installation disabled the extension, make sure it is now enabled.
2138 bool initial_enable = 2138 bool initial_enable =
2139 !extension_prefs_->IsExtensionDisabled(id) || 2139 !extension_prefs_->IsExtensionDisabled(id) ||
2140 system_->management_policy()->MustRemainEnabled(extension, NULL); 2140 system_->management_policy()->MustRemainEnabled(extension, NULL);
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 extensions::ExtensionHost* extension_host) { 2624 extensions::ExtensionHost* extension_host) {
2625 if (!extension_host) 2625 if (!extension_host)
2626 return; 2626 return;
2627 2627
2628 #if !defined(OS_ANDROID) 2628 #if !defined(OS_ANDROID)
2629 extensions::LaunchPlatformApp(extension_host->profile(), 2629 extensions::LaunchPlatformApp(extension_host->profile(),
2630 extension_host->extension(), 2630 extension_host->extension(),
2631 NULL, FilePath()); 2631 NULL, FilePath());
2632 #endif 2632 #endif
2633 } 2633 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698