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

Side by Side Diff: chromeos/dbus/update_engine_client.cc

Issue 825473002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « chromeos/dbus/power_manager_client.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/update_engine_client.h" 5 #include "chromeos/dbus/update_engine_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 UpdateEngineClient::EmptyUpdateCheckCallback() { 557 UpdateEngineClient::EmptyUpdateCheckCallback() {
558 return base::Bind(&EmptyUpdateCheckCallbackBody); 558 return base::Bind(&EmptyUpdateCheckCallbackBody);
559 } 559 }
560 560
561 // static 561 // static
562 UpdateEngineClient* UpdateEngineClient::Create( 562 UpdateEngineClient* UpdateEngineClient::Create(
563 DBusClientImplementationType type) { 563 DBusClientImplementationType type) {
564 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 564 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
565 return new UpdateEngineClientImpl(); 565 return new UpdateEngineClientImpl();
566 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 566 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
567 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestAutoUpdateUI)) 567 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
568 switches::kTestAutoUpdateUI))
568 return new UpdateEngineClientFakeImpl(); 569 return new UpdateEngineClientFakeImpl();
569 else 570 else
570 return new UpdateEngineClientStubImpl(); 571 return new UpdateEngineClientStubImpl();
571 } 572 }
572 573
573 // static 574 // static
574 bool UpdateEngineClient::IsTargetChannelMoreStable( 575 bool UpdateEngineClient::IsTargetChannelMoreStable(
575 const std::string& current_channel, 576 const std::string& current_channel,
576 const std::string& target_channel) { 577 const std::string& target_channel) {
577 auto cix = std::find(kReleaseChannelsList, 578 auto cix = std::find(kReleaseChannelsList,
578 kReleaseChannelsList + arraysize(kReleaseChannelsList), 579 kReleaseChannelsList + arraysize(kReleaseChannelsList),
579 current_channel); 580 current_channel);
580 auto tix = std::find(kReleaseChannelsList, 581 auto tix = std::find(kReleaseChannelsList,
581 kReleaseChannelsList + arraysize(kReleaseChannelsList), 582 kReleaseChannelsList + arraysize(kReleaseChannelsList),
582 target_channel); 583 target_channel);
583 return tix > cix; 584 return tix > cix;
584 } 585 }
585 586
586 } // namespace chromeos 587 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/power_manager_client.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698