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

Side by Side Diff: chrome/browser/extensions/api/management/management_api.cc

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/management/management_api.h" 5 #include "chrome/browser/extensions/api/management/management_api.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 CHECK(parsed_manifest); 387 CHECK(parsed_manifest);
388 388
389 scoped_refptr<Extension> extension = Extension::Create( 389 scoped_refptr<Extension> extension = Extension::Create(
390 base::FilePath(), Manifest::INVALID_LOCATION, *parsed_manifest, 390 base::FilePath(), Manifest::INVALID_LOCATION, *parsed_manifest,
391 Extension::NO_FLAGS, &error_); 391 Extension::NO_FLAGS, &error_);
392 if (!extension.get()) { 392 if (!extension.get()) {
393 OnParseFailure(keys::kExtensionCreateError); 393 OnParseFailure(keys::kExtensionCreateError);
394 return; 394 return;
395 } 395 }
396 396
397 std::vector<std::string> warnings = CreateWarningsList(extension); 397 std::vector<std::string> warnings = CreateWarningsList(extension.get());
398 results_ = management::GetPermissionWarningsByManifest::Results::Create( 398 results_ =
399 warnings); 399 management::GetPermissionWarningsByManifest::Results::Create(warnings);
400 SendResponse(true); 400 SendResponse(true);
401 401
402 // Matched with AddRef() in RunImpl(). 402 // Matched with AddRef() in RunImpl().
403 Release(); 403 Release();
404 } 404 }
405 405
406 void ManagementGetPermissionWarningsByManifestFunction::OnParseFailure( 406 void ManagementGetPermissionWarningsByManifestFunction::OnParseFailure(
407 const std::string& error) { 407 const std::string& error) {
408 error_ = error; 408 error_ = error;
409 SendResponse(false); 409 SendResponse(false);
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 ProfileKeyedAPIFactory<ManagementAPI>* ManagementAPI::GetFactoryInstance() { 716 ProfileKeyedAPIFactory<ManagementAPI>* ManagementAPI::GetFactoryInstance() {
717 return &g_factory.Get(); 717 return &g_factory.Get();
718 } 718 }
719 719
720 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { 720 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) {
721 management_event_router_.reset(new ManagementEventRouter(profile_)); 721 management_event_router_.reset(new ManagementEventRouter(profile_));
722 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 722 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
723 } 723 }
724 724
725 } // namespace extensions 725 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698