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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extensions_service.h" 5 #include "chrome/browser/extensions/extensions_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 frontend_ = frontend; 289 frontend_ = frontend;
290 290
291 // Explicit UI loads are always noisy. 291 // Explicit UI loads are always noisy.
292 alert_on_error_ = true; 292 alert_on_error_ = true;
293 293
294 FilePath extension_path = path_in; 294 FilePath extension_path = path_in;
295 file_util::AbsolutePath(&extension_path); 295 file_util::AbsolutePath(&extension_path);
296 296
297 std::string error; 297 std::string error;
298 scoped_refptr<const Extension> extension = extension_file_util::LoadExtension( 298 scoped_refptr<const Extension> extension(extension_file_util::LoadExtension(
299 extension_path, 299 extension_path,
300 Extension::LOAD, 300 Extension::LOAD,
301 false, // Don't require id 301 false, // Don't require id
302 &error); 302 &error));
303 303
304 if (!extension) { 304 if (!extension) {
305 ReportExtensionLoadError(extension_path, error); 305 ReportExtensionLoadError(extension_path, error);
306 return; 306 return;
307 } 307 }
308 308
309 // Report this as an installed extension so that it gets remembered in the 309 // Report this as an installed extension so that it gets remembered in the
310 // prefs. 310 // prefs.
311 BrowserThread::PostTask( 311 BrowserThread::PostTask(
312 BrowserThread::UI, FROM_HERE, 312 BrowserThread::UI, FROM_HERE,
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 ExtensionIdSet ExtensionsService::GetAppIds() const { 1871 ExtensionIdSet ExtensionsService::GetAppIds() const {
1872 ExtensionIdSet result; 1872 ExtensionIdSet result;
1873 for (ExtensionList::const_iterator it = extensions_.begin(); 1873 for (ExtensionList::const_iterator it = extensions_.begin();
1874 it != extensions_.end(); ++it) { 1874 it != extensions_.end(); ++it) {
1875 if ((*it)->is_app() && (*it)->location() != Extension::COMPONENT) 1875 if ((*it)->is_app() && (*it)->location() != Extension::COMPONENT)
1876 result.insert((*it)->id()); 1876 result.insert((*it)->id());
1877 } 1877 }
1878 1878
1879 return result; 1879 return result;
1880 } 1880 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/extensions/extensions_startup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698