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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc

Issue 17010003: Cleanup of system settings constants (ab)use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/chromeos/extensions/file_manager/file_browser_private_a pi.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/file_browser_private_a pi.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <sys/statvfs.h> 8 #include <sys/statvfs.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <utime.h> 10 #include <utime.h>
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 drive::DriveIntegrationServiceFactory::GetForProfile(profile_); 2248 drive::DriveIntegrationServiceFactory::GetForProfile(profile_);
2249 dict->SetBoolean("ENABLE_GDATA", integration_service != NULL); 2249 dict->SetBoolean("ENABLE_GDATA", integration_service != NULL);
2250 2250
2251 #if defined(USE_ASH) 2251 #if defined(USE_ASH)
2252 dict->SetBoolean("ASH", true); 2252 dict->SetBoolean("ASH", true);
2253 #else 2253 #else
2254 dict->SetBoolean("ASH", false); 2254 dict->SetBoolean("ASH", false);
2255 #endif 2255 #endif
2256 2256
2257 std::string board; 2257 std::string board;
2258 const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD";
2259 chromeos::system::StatisticsProvider* provider = 2258 chromeos::system::StatisticsProvider* provider =
2260 chromeos::system::StatisticsProvider::GetInstance(); 2259 chromeos::system::StatisticsProvider::GetInstance();
2261 if (!provider->GetMachineStatistic(kMachineInfoBoard, &board)) 2260 if (!provider->GetMachineStatistic(
2261 chromeos::system::kMachineInfoBoard,
2262 &board)) {
2262 board = "unknown"; 2263 board = "unknown";
2263 dict->SetString(kMachineInfoBoard, board); 2264 }
2265 dict->SetString(chromeos::system::kMachineInfoBoard,
2266 board);
xiyuan 2013/06/18 04:59:23 nit: Does this fit in one line?
zel 2013/06/18 17:56:37 Done.
2264 2267
2265 return true; 2268 return true;
2266 } 2269 }
2267 2270
2268 GetDriveEntryPropertiesFunction::GetDriveEntryPropertiesFunction() { 2271 GetDriveEntryPropertiesFunction::GetDriveEntryPropertiesFunction() {
2269 } 2272 }
2270 2273
2271 GetDriveEntryPropertiesFunction::~GetDriveEntryPropertiesFunction() { 2274 GetDriveEntryPropertiesFunction::~GetDriveEntryPropertiesFunction() {
2272 } 2275 }
2273 2276
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 OpenNewWindowFunction::OpenNewWindowFunction() {} 3083 OpenNewWindowFunction::OpenNewWindowFunction() {}
3081 3084
3082 OpenNewWindowFunction::~OpenNewWindowFunction() {} 3085 OpenNewWindowFunction::~OpenNewWindowFunction() {}
3083 3086
3084 bool OpenNewWindowFunction::RunImpl() { 3087 bool OpenNewWindowFunction::RunImpl() {
3085 std::string url; 3088 std::string url;
3086 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url)); 3089 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &url));
3087 file_manager_util::OpenNewWindow(profile_, GURL(url)); 3090 file_manager_util::OpenNewWindow(profile_, GURL(url));
3088 return true; 3091 return true;
3089 } 3092 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698