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

Side by Side Diff: extensions/browser/api/system_cpu/system_cpu_api.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "extensions/browser/api/system_cpu/cpu_info_provider.h" 6 #include "extensions/browser/api/system_cpu/cpu_info_provider.h"
7 #include "extensions/browser/api/system_cpu/system_cpu_api.h" 7 #include "extensions/browser/api/system_cpu/system_cpu_api.h"
8 #include "extensions/common/features/base_feature_provider.h" 8 #include "extensions/common/features/base_feature_provider.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 using core_api::system_cpu::CpuInfo; 12 using api::system_cpu::CpuInfo;
13 13
14 SystemCpuGetInfoFunction::SystemCpuGetInfoFunction() { 14 SystemCpuGetInfoFunction::SystemCpuGetInfoFunction() {
15 } 15 }
16 16
17 SystemCpuGetInfoFunction::~SystemCpuGetInfoFunction() { 17 SystemCpuGetInfoFunction::~SystemCpuGetInfoFunction() {
18 } 18 }
19 19
20 bool SystemCpuGetInfoFunction::RunAsync() { 20 bool SystemCpuGetInfoFunction::RunAsync() {
21 CpuInfoProvider::Get()->StartQueryInfo( 21 CpuInfoProvider::Get()->StartQueryInfo(
22 base::Bind(&SystemCpuGetInfoFunction::OnGetCpuInfoCompleted, this)); 22 base::Bind(&SystemCpuGetInfoFunction::OnGetCpuInfoCompleted, this));
23 return true; 23 return true;
24 } 24 }
25 25
26 void SystemCpuGetInfoFunction::OnGetCpuInfoCompleted(bool success) { 26 void SystemCpuGetInfoFunction::OnGetCpuInfoCompleted(bool success) {
27 if (success) 27 if (success)
28 SetResult(CpuInfoProvider::Get()->cpu_info().ToValue().release()); 28 SetResult(CpuInfoProvider::Get()->cpu_info().ToValue().release());
29 else 29 else
30 SetError("Error occurred when querying cpu information."); 30 SetError("Error occurred when querying cpu information.");
31 SendResponse(success); 31 SendResponse(success);
32 } 32 }
33 33
34 } // namespace extensions 34 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/system_cpu/cpu_info_provider_win.cc ('k') | extensions/browser/api/system_cpu/system_cpu_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698