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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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
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/webstore_private/webstore_private_api.h" 5 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return api::webstore_private::RESULT_UNKNOWN_ERROR; 115 return api::webstore_private::RESULT_UNKNOWN_ERROR;
116 case WebstoreInstallHelper::Delegate::ICON_ERROR: 116 case WebstoreInstallHelper::Delegate::ICON_ERROR:
117 return api::webstore_private::RESULT_ICON_ERROR; 117 return api::webstore_private::RESULT_ICON_ERROR;
118 case WebstoreInstallHelper::Delegate::MANIFEST_ERROR: 118 case WebstoreInstallHelper::Delegate::MANIFEST_ERROR:
119 return api::webstore_private::RESULT_MANIFEST_ERROR; 119 return api::webstore_private::RESULT_MANIFEST_ERROR;
120 } 120 }
121 NOTREACHED(); 121 NOTREACHED();
122 return api::webstore_private::RESULT_NONE; 122 return api::webstore_private::RESULT_NONE;
123 } 123 }
124 124
125 static base::LazyInstance<PendingApprovals> g_pending_approvals = 125 static base::LazyInstance<PendingApprovals>::DestructorAtExit
126 LAZY_INSTANCE_INITIALIZER; 126 g_pending_approvals = LAZY_INSTANCE_INITIALIZER;
127 127
128 // A preference set by the web store to indicate login information for 128 // A preference set by the web store to indicate login information for
129 // purchased apps. 129 // purchased apps.
130 const char kWebstoreLogin[] = "extensions.webstore_login"; 130 const char kWebstoreLogin[] = "extensions.webstore_login";
131 131
132 // Error messages that can be returned by the API. 132 // Error messages that can be returned by the API.
133 const char kAlreadyInstalledError[] = "This item is already installed"; 133 const char kAlreadyInstalledError[] = "This item is already installed";
134 const char kInvalidIconUrlError[] = "Invalid icon url"; 134 const char kInvalidIconUrlError[] = "Invalid icon url";
135 const char kInvalidIdError[] = "Invalid id"; 135 const char kInvalidIdError[] = "Invalid id";
136 const char kInvalidManifestError[] = "Invalid manifest"; 136 const char kInvalidManifestError[] = "Invalid manifest";
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 652
653 return RespondNow(BuildResponse(is_pending_approval)); 653 return RespondNow(BuildResponse(is_pending_approval));
654 } 654 }
655 655
656 ExtensionFunction::ResponseValue 656 ExtensionFunction::ResponseValue
657 WebstorePrivateIsPendingCustodianApprovalFunction::BuildResponse(bool result) { 657 WebstorePrivateIsPendingCustodianApprovalFunction::BuildResponse(bool result) {
658 return OneArgument(base::MakeUnique<base::Value>(result)); 658 return OneArgument(base::MakeUnique<base::Value>(result));
659 } 659 }
660 660
661 } // namespace extensions 661 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc ('k') | chrome/browser/extensions/blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698